React Native SDK
Sign end users in through the hosted login from React Native, on top of the iOS and Android SDKs.
@ohauthcat/react-native runs the sign-in logic (PKCE, state, nonce, callback and ID-token checks, refresh, revocation) in TypeScript and uses the native iOS and Android SDKs for the system browser, secure storage, random bytes and passkeys. Tokens never go to AsyncStorage.
Install
Section titled “Install”npm install @ohauthcat/react-nativecd ios && pod install- Create the client with
new OhAuthCatClient(.{ loginOrigin, clientId, redirectUri }, nativePlatform( NativeModules. OhAuthCat, base64UrlDecode, fetch)) - Methods match the browser client:
signIn,signOut,getAccessToken,refresh,getUser,switchOrganization,isSignedInandpasskeys(backend). - iOS: add the
OhAuthCatReactNativepod. Android: the module autolinks; setmanifestPlaceholders["ohauthcatRedirectScheme"].
The bridge validates every value from JavaScript; native rejections map to OhAuthCatError with the catalogue code.