π©βπ¨Social Auth
Enable Google, Facebook, Microsoft, KakaoTalk, or any other OAuth provider login directly inside your Natively app.
What is Social Auth?
Social Auth enables third-party OAuth login inside your Natively app. Instead of building a custom authentication system, your users can sign in with an account they already have - Google, Facebook, Microsoft, KakaoTalk, or any other OAuth provider.
If your app offers any third-party login options, Apple requires you to also offer Sign In with Apple for your iOS app.
How does it work?
When a user taps a social login button in your app, Natively intercepts the OAuth request and handles it outside the normal embedded browser flow. The exact behavior depends on the platform, provider, and OS version.
iOS
Natively opens Apple's secure native authentication sheet (ASWebAuthenticationSession) to handle the OAuth flow. Before the sign-in page loads, iOS shows a system dialog asking the user to confirm they want to continue. Once confirmed, the sign-in page loads inside the sheet - the user signs in without fully leaving the app. Once authentication is complete, the provider redirects back to your app to finish the sign-in.
For Social Auth to work correctly on iOS, your AASA file must include the webcredentials section. Without it, the native authentication sheet will not be triggered, and the authentication will fall back to the internal browser instead.
Android
Natively shows a Redirect notice asking the user to open the login page in the default browser. Cancelling reloads the current page. Confirming opens the login page in the device's default browser. Once authentication is complete, the provider redirects back to your app to finish the sign-in.
Prerequisites
This feature requires the Unlimited or Lifetime plan. See all plans
Deep Links configured and working on both iOS and Android - required for the device to route the OAuth redirect back to your app.
Your OAuth provider configured with the correct Redirect URL before setting up Social Auth in the Natively Dashboard.
Natively Dashboard Setup
Deep Links must be enabled and functioning correctly before setting up Social Auth. Without them, users cannot be redirected back to your app after authentication.
Open your Natively app dashboard and navigate to Features > Social Auth.
Toggle the feature to Enabled.
Enter your Redirect URL - see Redirect URL below for details.
(Optional) Add Custom OAuth URLs - see Custom OAuth URLs below for details.
Click Save.
Rebuild your app(s).
You must rebuild your app for these changes to take effect.
Redirect URL
The Redirect URL tells Natively which URL to watch for to know that authentication is complete. Once the OAuth provider finishes authenticating the user, it redirects to this URL carrying the authentication token. Natively detects this match, intercepts the redirect, and loads that final URL back into your mobile app, completing the sign-in.
The Redirect URL must exactly match the redirect URL configured on your OAuth provider's side (e.g. in Google Cloud Console). If they don't match, the provider will not redirect to the correct URL, and the authentication will fail.
The Redirect URL must be on the same domain as your Deep Links configuration. Deep Links are what allow the device to route the redirect back to your app instead of opening it as a normal web page. If the domains don't match, the user will not be redirected back to your app after authentication.
Custom OAuth URLs
By default, Natively recognizes a set of built-in OAuth provider URLs: Google, Facebook, Microsoft, and KakaoTalk, and applies the native authentication flow to them automatically. Custom OAuth URLs allow you to expand this list with any additional OAuth provider your app uses.
When Natively detects a login URL that matches one of your custom entries, it applies the same authentication flow as for the built-in providers: native authentication sheet on iOS and an external browser on Android.
Do not add your own website or app domain to Custom OAuth URLs. Any link from your app to your own domain that matches a custom OAuth URL will trigger the redirect notice on Android or open a native authentication sheet on iOS instead of loading normally inside the app. Only add URLs that belong to the OAuth provider's authentication endpoints.
Custom OAuth URLs must include both a host and a path - for example accounts.yourprovider.com/o/oauth2. A domain alone without a path is not valid.
Supported providers
Natively has built-in support for Google, Facebook, Microsoft, and KakaoTalk.
Any other OAuth provider can be added via Custom OAuth URLs. Note that unlisted providers are not guaranteed to work and should be tested thoroughly before releasing to users.
Troubleshooting
Last updated
Social Auth works after publishing, but fails in testing
Universal Links and Android App Links can be unreliable in development/testing builds, depending on how the app is installed and signed. They are expected to work reliably once the app is properly published to the App Store / Play Store. If you're seeing failures only in testing, verify your AASA file and assetlinks.json are correctly hosted and that the test build matches your production signing configuration.