React Native & Expo
A provider, hooks, and a deep-link login flow built for mobile. Works in Expo and bare React Native alike, with react and react-native as the only peers.
- Expo and bare RN
- Two peer dependencies
React Native / Expo
Add secure sign-in to your React Native or Expo app: hosted login via deep links, pluggable secure storage, and familiar hooks that mirror the rest of the Authdog Web SDK.
Wrap your app
// App.tsx
import {
AuthdogProvider,
createSecureStoreAdapter,
} from "@authdog/react-native"
export default function App() {
return (
<AuthdogProvider
publicKey={PK}
storage={createSecureStoreAdapter(SecureStore)}
>
<RootNavigator />
</AuthdogProvider>
)
}
Sign in via deep links
// SignInScreen.tsx
import { useSignIn, useRedirectHandler } from "@authdog/react-native"
const { signIn } = useSignIn()
const { handleRedirect } = useRedirectHandler()
// open hosted login, finish via deep link
signIn({ redirectUrl: "myapp://callback" })
Built for mobile
Deep-link login, secure token storage, and familiar hooks for React Native and Expo.
A provider, hooks, and a deep-link login flow built for mobile. Works in Expo and bare React Native alike, with react and react-native as the only peers.
Open the hosted login flow and complete it from the deep link the identity server redirects back to, on both cold and warm starts.
Bring expo-secure-store, AsyncStorage, or your own async store. Tokens are kept in hardware-backed, encrypted storage when you wire it up.
Tokens are validated as a JWT before storage and the identity host is constrained to the trusted-host allowlist, so tokens can't be exfiltrated.
useUser, useSession, useSignIn, and useSignOut mirror the rest of the Authdog Web SDK, so mobile feels like the web you already know.
A fully typed SDK gives you autocomplete for the session, user, and permissions returned to your screens.
Add @authdog/react-native and a secure storage adapter.
Wrap your root navigator in AuthdogProvider.
Call signIn() with your deep-link redirect and read the session from hooks.
Install the SDK, wrap your app in the provider, and open the hosted login flow today. Free to start, with secure defaults built in.