Registration with browser IdP
Introduction
In case when user tries to register with an Identity Provider (IdP) that is browser-based, the SDK needs to ask for an access grant to the Token Server via the browser.
Open a browser or webview
After starting registration the app will receive an url from the SDK. This url will have to be opened in a browser and authentication will have to be completed there to continue the registration. This url is sent to the application in the form of an event which has to be listened to.
A simple implementation can be done using the ReactNative Linking library to open up a browser, handled by the system, where the registration can be handled.
Handle URL
After successfully authenticating in the browser on the supplied IdP, the browser will be redirected to a url with a custom schema url based on the provided schema url in the SDK config. This url will be treated by the operating system as a DeepLink. The application will have to catch this and pass it back to the SDK using the handleRegistrationCallback method.
In order to receive this DeepLink you will first have to enable DeepLinks in your application.
You can easily add the required configuration for your info.plist for iOS and AndroidManifest.xml for android with the uri-scheme package built by Expo. > > You will also be able to use this package to test DeepLinks in your application.