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.
Want to skip the docs? Try our MCP Server
#
Documentation
#
#
Usage
#
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>
);
}#
Related
#
FileUpload
Capture file input from users with drag and drop.
#
Props
#
#
AuthProvider
#
Doesn't render its own HTML element.
Prop |
|---|
instance*The ID of the instance the user is currently accessing.
|
refresh*Callback to refresh and return a new auth token in case it becomes stale.
|
token*The auth token of the current user session.
|
#
Changelog
#
#
1.6.2
#
- Added component
Last updated on