@drmhse/authos-react
v0.2.5
Published
React and Next.js adapter for AuthOS authentication
Maintainers
Readme
@drmhse/authos-react
React and Next.js adapter for AuthOS.
Full documentation: authos.dev/docs/packages/authos-react/
AI agent skills: authos.dev/docs/ai-agent-skills/ and github.com/drmhse/authos_skill
Install
npm install @drmhse/authos-reactQuick start
import {
AuthOSProvider,
SignIn,
SignedIn,
SignedOut,
UserButton,
} from '@drmhse/authos-react';
export function App() {
return (
<AuthOSProvider config={{ baseURL: 'https://sso.example.com' }}>
<SignedOut>
<SignIn />
</SignedOut>
<SignedIn>
<UserButton />
</SignedIn>
</AuthOSProvider>
);
}Scoped tenant usage
<AuthOSProvider
config={{
baseURL: 'https://sso.example.com',
org: 'acme-corp',
service: 'main-app',
redirectUri: 'https://app.acme.com/callback',
}}
>
<SignIn providers={['github', 'google']} />
</AuthOSProvider>Includes
AuthOSProviderSignIn,SignUp,Callback,OAuthButtonSignedIn,SignedOut,UserButton- Hooks such as
useAuthOS,useUser, and permission helpers
See the docs site for component props, Next.js notes, and advanced patterns.
