Registration with third-party mobile applications
Introduction
Registration with third-party mobile application is possible using two step custom registration.
Prerequisites
Number of properties needs to be setup on the backend side, so be sure that it is properly configured. Proper two step custom registration IDP with scripts for both init
and complete
steps needs to be set up. Third-party app needs to be installed on the device and be ready to receive and emit App Links.
Flow overview
- App initiates custom registration with
init
request. Init
response withsessionId
andapp link
.- App opens the third party app using
app link
. - Third party app authenticates user and navigates back to the app using
app link.
- App extracts
artefactId
from theapp link
and sends it to the backend along withsessionId
. - Registration finishes and app receives access/refresh token.
- Proceed with PIN creation flow.
Example of the flow
Your app needs to be able to receive App Links from third party app. Be sure to register correct app link
in your manifest file.
Implement OneginiCustomTwoStepRegistrationAction interface.
On successful authentication in third-party app, it will run app link
back into your app with json
response. Unpack response value, parse it with sessionId
into new json
and send it back do the backend via callback.onSuccess(json)
from finishRegistration
method.
Implement OneginiCustomIdentityProvider interface.
In example above, IDP id is
app2app
, be sure to use an id of the IDP which is set in your backend.