open-index/open-npm huggingface dataset:
npm package: @globus/react-auth-context
Description: A React context for integrating Globus Auth into your application using the Globus JavaScript SDK
Author: Joe Bottigliero
Latest version: 0.4.0

[![npm](https://img.shields.io/npm/v/@globus/react-auth-context?style=flat-square&logo=npm&color=000&label)](https://www.npmjs.com/package/@globus/react-auth-context)

# `@globus/react-auth-context`

A simple React context for managing Globus-related authentication state, built on top of the [@globus/sdk](https://github.com/globus/globus-sdk-javascript).


## Installation

```
npm install --save @globus/sdk @globus/react-auth-context
```

## Usage

The package includes a `<Provider>` that can be configured with a `client`, `scopes`, and `redirect` that will be used to configure an `AuthorizationManager` instance for the context. The `useGlobusAuth` hook can be used to access the authentication state and the `AuthorizationManager` instance.

```tsx
import React, { useEffect } from "react";
import { Provider, useGlobusAuth } from '@globus/react-auth-context';

/**
 * Your registered Globus Client ID.
 */
const client = '645b6bfb-4195-4010-83f5-a71332bd4761';
/**
 * Scopes required for your application on login.
 */
const scopes = 'urn:globus:auth:scope:transfer.api.globus.org:all';
/**
 * Redirect URL that will complete the OAuth2 flow, this will also be the location you call `.handleCodeRedirect` from.
 */
const redirect = '/';

const App = () => (
  /**
   * The `Provider` component wraps the application and provides the authentication context.
   */
  <Provider client={client} scopes={scopes} redirect={redirect}>
    <ExampleComponent />
  </Provider>
);


const ExampleComponent = () => {
  /**
   * The `useGlobusAuth` hook provides access to the authentication state and the `AuthorizationManager` instance.
   */
  const { isAuthenticated, authorization } = useGlobusAuth();
 

  useEffect(() => {
    async function attempt() {
      if (!authorization || isAuthenticated) {
        return;
      }

      await authorization?.handleCodeRedirect({
        shouldReplace: false,
      });
    }
    attempt();
  }, [authorization, authorization?.handleCodeRedirect, isAuthenticated]);

  return (
    <div>
      {isAuthenticated ? (
        <button onClick={async () => await auth.authorization?.revoke()}>Logout</button>
      ) : (
        <button  onClick={async () => await auth.authorization?.login()}>Login</button>
      )}
    </div>
  );
};
```


- [API Documentation](/docs/globals.md)
npm package: @globus/static-data-portal
Description: **🧪 BETA 🧪**
Latest version: 3.0.3

# static-data-portal

**🧪 BETA 🧪**

This is a Globus-powered research data portal `generator` created using Next.js.

---

**⚠️ IMPORTANT ⚠️** You only need to interact with **this** repository if you are improving the `generator` or using this code to start a self-managed project. If you want to deploy a data portal, copy our [template-data-portal](https://github.com/globus/template-data-portal) and modify the `static.json` file to suit your needs.

---

- [static.json Type Documentation](docs/globals.md)

---

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## Developer Documentation

### `static.json`

- The `static.json` file is the main configuration file for the data portal.
- The `utils/static.ts` file is used to enforce a TypeScript type on this file.
- All pages and components that source information from the user-provided `static.json` should use `utils/static.ts` and its available helpers.
- Typedoc is configured to generate documentation from `utils/static.ts`.

The included `static.json` in this repository is configured toward local development, using a non-production Globus environment (`sandbox`).

### MDX Support

[MDX](https://nextjs.org/docs/pages/building-your-application/configuring/mdx) support has been added to the project.

For simple pages, e.g. "Terms and Conditions" and "Privacy Policy" `.mdx` is used to simplify these files being overwritten by end consumers using a `overrides` or `content` directory.

### `content` Directory

An end-user provided `content` directory can be defined to provide Markdown (or MDX) files that will be added as `pages` in the Next.js project. This allows for the end-user to provide custom pages without modifying the core project (via `overrides`). This also allows us to provide backwards compatibility should we decide to move away from Next.js in the future.
npm package: @globus/static-search-portal
Description: **⚠️ IMPORTANT ⚠️** You only need to interact with **this** repository if you are improving the `generator` or using this code to start a self-managed project. If you want to deploy a search portal, copy our [template-search-portal](https://github.com/glo
Latest version: 1.7.2

# static-search-portal

**⚠️ IMPORTANT ⚠️** You only need to interact with **this** repository if you are improving the `generator` or using this code to start a self-managed project. If you want to deploy a search portal, copy our [template-search-portal](https://github.com/globus/template-search-portal) and modify the `static.json` file to suit your needs.

---

- [static.json Type Documentation](/docs/type-aliases/Static.md)

---

This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
npm package: @globus/stencil-components
Description: A suite of Globus Web Components built with Stencil.
Latest version: 0.0.3-alpha

[![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)

# @globus/stencil-components

A suite of Globus Web Components built with Stencil.