Auth0 and app configuration
Auth0 configuration
Auth0 application type
Regardless of your existing Applications, Universal Login will require a new Native Application, as the Auth0 Quickstart Guide outlines.
Auth0 application type
Auth0 application URIs
As a next step after creating the application, you will need to configure the callback URIs for your Auth0 application. The configuration requires you to set up at minimum the Allowed Callback URLs and Allowed Logout URLs. For our example configuration, we assume the following values:
Based on the parameters above we can add the following three URLs to the Auth0 application configuration as allowed Callback URLs and Allowed Logout URLs:

Auth0 callback and logout URLs
Advanced settings: device settings
Please populate your iOS bundle ID and Android Package name under Advanced Setting > Device Settings in the Auth0 Dashboard.
Auth0 device settings
App configuration
Link handling
Link handling rules
Verify the link handling rules for links to your Auth0 Domain. You can learn more about link handling in our Link Behavior article.Universal deep links
Verify that Deep Linking is configured properly for all domains with Universal Links selected under Link Handling → Universal Links / Deep Links / Web Credentials.URL scheme protocol
Verify a URL Scheme Protocol is specified for your app. The URL Scheme and all other values including Package Name and Bundle ID must match the parameters set in your Auth0 tenant.Auth0 plugin configuration
The Auth0 Native Plugin requires several parameters to be set in App Studio, on the Native Plugins tab under “Advanced Mode”. Sample parameters are as follows:schemeis based on the URL scheme of your Android Callback URLs.audienceis optional and based on your Auth0 tenant config.

App Studio: Auth0 example configuration
Implementation guide
Sign in with Universal Login
Launch Universal Login via the Median JavaScript Bridgelogin method. Upon completion of Universal Login flow focus is returned to the app webview and a promise/callback function is invoked with the Auth0 tokens as parameters.
To prompt Universal Login and retrieve a token:

Auth0 Universal Login
Sign out
To sign out:Support for Face ID / Touch ID / Android biometrics
Get saved credentials
Credentials are saved in the device secure storage and can be retrieved in later sessions. Retrieving saved credentials will automatically renew the tokens using therefreshToken already saved from the previous successful sign-in.
To get credentials saved in secure storage:
Renew credentials
Retrieving the credentials automatically returns renewed credentials if the existing credentials are expired but you can also request to renew the credentials manually. You can optionally pass arefreshToken to be used. By default, the method will use the refresh token saved from the previous successful sign-in.
To renew credentials manually:
Implementation checklist
Auth0 platform configuration
- Set up a new Native or Single Page Web Application Auth0 app using the Auth0 Quickstart Guides.
- Configure Allowed Callback URLs and Allowed Logout URLs based on your Auth0 tenant domain, iOS Bundle ID, and Android Package Name.
- Configured the Advanced Settings > Device Settings by providing iOS Team ID, and App ID as well as Android App Package Name and Key Hashes
Median app and plugin configuration
- Configure link handling rules based on your Auth0 tenant domain.
- Add Deep Linking configuration for your Auth0 tenant domain.
- Verify or add URL Scheme Protocol configuration based on parameters set in your Auth0 tenant.
- Verify the Auth0 Plugin configuration and add required parameters: “domain,” “clientId,” “scheme,” and (optionally) “audience.”
Website implementation
- Use
median.auth0.loginto launch the Auth0 plugin and initiate the authentication flow for app users. - Use
median.auth0.logoutto provide app users with a sign-out method. - Review JavaScript and Auth0 implementation to ensure the use of refresh tokens and enable biometrics.
- Set up and publicly host
[yourdomain]/.well-known/assetlinks.jsonand[yourdomain]/.well-known/apple-app-site-associationfiles to enable deep linking.
Auth0 plugin demo
Frequently asked questions
Why should I integrate Median's Auth0 plugin and use Auth0 Universal Login?
Why should I integrate Median's Auth0 plugin and use Auth0 Universal Login?
Median’s Auth0 plugin makes use of the Auth0 iOS and Android native SDKs for the most secure app sign-in experience, consistent with best practices for managing authentication. To learn more about the security benefits of Auth0 Universal Login versus embedded login flows consult the Auth0 documentation discussing Centralized Universal Login vs. Embedded Login.
Can I support login on my own web page displayed within the app webview?
Can I support login on my own web page displayed within the app webview?
Mobile security policies and the Internet Engineering Task Force (IETF) Best Current Practices (BCP) require that user login only be made in a browser session facilitated through a native app, and not be permitted in an embedded app webview itself. Google Sign-In, Facebook Login, and Auth0 hosted Universal Login make this mandatory.
- IETF RFC 8252: OAuth 2.0 for Native Apps
- Auth0: OAuth 2.0 best practices for native apps
- Google: security changes to OAuth 2.0 in embedded webviews
- Meta: deprecating Facebook Login on Android embedded browsers