@auther-sdk/react
v1.0.3
Published
Official React bindings for Auther — drop-in AutherProvider with built-in session management and proactive token refresh.
Downloads
29
Maintainers
Readme
@auther-sdk/react
React bindings for Auther: a drop-in AutherProvider with
built-in session management and proactive token refresh, plus a useAuther hook. Wraps
@auther-sdk/frontend.
Install
npm install @auther-sdk/reactUsage
import { AutherProvider, useAuther } from '@auther-sdk/react';
function App() {
return (
<AutherProvider config={{ projectId: 'proj_live_xxxxxxxxxxxx' }}>
<Dashboard />
</AutherProvider>
);
}
function Dashboard() {
const { user, isLoading } = useAuther();
if (isLoading) return <p>Loading...</p>;
return <p>Signed in as {user?.email}</p>;
}Full guide at auther.ziloris.com/docs.
License
Apache-2.0, Copyright Ziloris.
