Skip to Content
ComponentsAuthProvider

AuthProvider

AuthProvider is used to pass down the user credentials to all components. It should be rendered near the root of your application and should be used only once.

Documentation

import { AuthProvider } from "@optiaxiom/react"; export function App() { return ( <AuthProvider instance="INSERT_INSTANCE_ID_HERE" token="INSERT_AUTH_TOKEN_HERE" > {/* Your app code here */} </AuthProvider> ); }

FileUpload

Capture file input from users with drag and drop.

Props

Doesn't render its own HTML element.

Prop

instance*

The ID of the instance the user is currently accessing.

string

refresh*

Callback to refresh and return a new auth token in case it becomes stale.

() => Promise<string>

token*

The auth token of the current user session.

string

Changelog

  • Added component
Last updated on