{"templateId":"markdown","sharedDataIds":{},"props":{"metadata":{"markdoc":{"tagList":["CodeBlockCustom","CodeItem"]},"type":"markdown"},"seo":{"title":"React Native advanced setup","siteUrl":"https://developers.frontegg.com/","llmstxt":{"title":"Frontegg Developer Documentation","description":"Authentication, authorization, and user management for Customer Identity, plus Agen for SaaS and Agen for Work. Guides, SDKs, and API references.","sections":[{"title":"Customer Identity (CIAM)","description":"Auth, SSO, SCIM, entitlements, and user management — guides, SDKs, and APIs.","includeFiles":["ciam/**/*.md"],"excludeFiles":[]},{"title":"Agen for SaaS","description":"Agentic access and authorization for SaaS products.","includeFiles":["agen-for-saas/**/*.md"],"excludeFiles":[]},{"title":"Agen for Work","description":"Agentic access and authorization for internal and workforce use.","includeFiles":["agen-for-work/**/*.md"],"excludeFiles":[]},{"title":"Platform","description":"Shared platform overview.","includeFiles":["platform/**/*.md"],"excludeFiles":[]}],"excludeFiles":["internal-docs/**","ciam/guides/env-settings/inject-client-ip.md","CLAUDE.md",".claude/**","**/images/**"],"hide":false}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"react-native-advanced-setup","__idx":0},"children":["React Native advanced setup"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In this guide, you'll find an overview and best practices for enabling advanced features and using built in functions for biometric authentication (passkeys) and step-up."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"passkeys-authentication","__idx":1},"children":["Passkeys authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Passkeys provide a seamless, passwordless login experience using WebAuthn and platform-level biometric authentication."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Prerequisites"]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["iOS Version"]},":  Ensure your project targets iOS 15 or later to support the necessary WebAuthn APIs."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Android"]},": Use Android SDK 26+."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Frontegg SDK Version"]},": Use Frontegg iOS SDK version 1.2.24 or later."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"android-setup","__idx":2},"children":["Android setup"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android/build.gradle"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add the following Gradle dependencies under dependencies:"]}]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["Groovy"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"groovy","header":{"controls":{"copy":{}}},"source":"      dependencies {\n       implementation 'androidx.browser:browser:1.8.0'\n       implementation 'com.frontegg.sdk:android:1.2.30'\n   }\n","lang":"groovy"},"children":[]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Inside the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["android"]}," block, add the following to set Java 8 compatibility:"]}]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["Groovy"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"groovy","header":{"controls":{"copy":{}}},"source":"    android {\n     compileOptions {\n         sourceCompatibility JavaVersion.VERSION_1_8\n         targetCompatibility JavaVersion.VERSION_1_8\n     }\n   }\n","lang":"groovy"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"ios-setup","__idx":3},"children":["iOS setup"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open your project in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Xcode"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Go to your ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["target"]}," settings"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Signing & Capabilities"]}," tab"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Capability"]}," button and add ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Associated Domains"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Under ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Associated Domains"]},", click the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+"]}," and add: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webcredentials:your-domain.com"]},". For example, if your domain is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://example.com"]},", use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webcredentials:example.com"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your domain in the format: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webcredentials:[YOUR_DOMAIN]"]},". For example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["webcredentials:example.com"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Host a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".well-known/webauthn"]}," JSON file on your domain server with the following structure:"]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["JSON"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"   {\n     \"origins\": [\n       \"https://example.com\",\n       \"https://subdomain.example.com\"\n     ]\n   }\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"br","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":7},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Ensure the file is publicly accessible at: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://example.com/.well-known/webauthn"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify that your Associated Domains configuration works using ",{"$$mdtype":"Tag","name":"a","attributes":{"href":"https://developer.apple.com/contact/request/associated-domains"},"children":["Apple’s Associated Domains Validator"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"register-passkeys","__idx":4},"children":["Register passkeys"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the registerPasskeys method to register a passkey for the current user:"]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["TypeScript"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"import { registerPasskeys } from '@frontegg/react-native';\n\nasync function handleRegisterPasskeys() {\n  try {\n    await registerPasskeys();\n    console.log('Passkeys registered successfully');\n  } catch (error) {\n    console.error('Error registering passkeys:', error);\n  }\n}\n","lang":"tsx"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"login-with-passkeys","__idx":5},"children":["Login with passkeys"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use the loginWithPasskeys method to log in using passkeys:"]},{"$$mdtype":"Tag","name":"CodeBlockCustom","attributes":{"tabs":["TypeScript"]},"children":[{"$$mdtype":"Tag","name":"CodeItem","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"tsx","header":{"controls":{"copy":{}}},"source":"import { loginWithPasskeys } from '@frontegg/react-native';\n\nasync function handleLoginWithPasskeys() {\n  try {\n    await loginWithPasskeys();\n    console.log('Passkeys login successful');\n  } catch (error) {\n    console.error('Error logging in with Passkeys:', error);\n  }\n}\n","lang":"tsx"},"children":[]}]}]}]},"headings":[{"value":"React Native advanced setup","id":"react-native-advanced-setup","depth":2},{"value":"Passkeys authentication","id":"passkeys-authentication","depth":3},{"value":"Android setup","id":"android-setup","depth":4},{"value":"iOS setup","id":"ios-setup","depth":4},{"value":"Register passkeys","id":"register-passkeys","depth":4},{"value":"Login with passkeys","id":"login-with-passkeys","depth":4}],"frontmatter":{"seo":{"title":"React Native advanced setup"}},"lastModified":"2025-11-04T13:25:50.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ciam/sdks/mobile/react-native/advanced-old","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}