πŸ‘©β€πŸŽ¨Social Auth

What is Social Auth?

The Social Auth functionality enables Natively to manage third-party OAuth integrations directly within the application. To adhere to the policies of Google and Facebook, which prohibit developers from utilizing web authorization within WKWebView (iOS) and WebView (Android), Natively reroutes users to the official operating system browsers: Chrome (for Android) and Safari (for iOS). This measure is taken to circumvent potential security risks.

Currently, Natively primarily supports social authorization for Google, Facebook, Microsoft and KakaoTalk. You are welcome to try implementing any other OAuth provider by following their official documentation, but we cannot guarantee that the integration will function properly.

If you have suggestions for additional integrations you would like us to support, please submit your request here.

How to set up Social Auth?

  1. Make sure to enable Associated Domain for iOS.

  2. Turn on the Universal Links feature.

  3. Setup Universal Links (This step is very important! Otherwise, Social Auth will not work.)

  4. Verify if Universal Links works. iOS and Android.

  5. Turn on the Social Auth feature in the Natively app dashboard.

  6. Enter your Redirect URL - a URL that will be associated with your application (We need it to redirect users back to your app after authorization). For example, app.buildnatively.com/api/oauth_redirect

  7. Rebuild your app

  8. Test

IMPORTANT!

You need to make sure your redirect URL for Facebook/Google has the same domain that one of you're using in Universal Links (This is needed to redirect the user back with an auth token in such url so that you can handle it in the web app)

For example, in Bubble you can turn on the generic URL in Facebook or Google plugins:

and, of course, update it on Google and Facebook developer accounts (if needed).

Advanced

Custom OAuth URLs

This feature allows you to whitelist specific external login URLs, preventing them from causing capability issues during the OAuth process. The login session is handled in a temporary environment.

Instructions

  1. Enter the OAuth URL into the designated field.

  2. Click the Add button to add the URL to the list. The URL will be enclosed in quotation marks automatically. (To remove an item, click the Trash icon next to the URL)

  3. Click Save and Rebuild your app to apply the changes.

Last updated

Was this helpful?