Android Architecture and Flow
To kick off the identity provider flow, a user can open either an identity provider or an identity provider client app. In Android, the implementation differs depending on which side initiates it.
The following steps describe the identity provider flow when launched from an identity provider client.
- User launches the identity provider client and chooses “Log in with IDP”.
- Identity provider client swizzles to the identity provider for authentication.
- Identity provider completes authentication and swizzles back to the client app.
The following steps describe the identity provider flow when launched from an identity provider.
- User launches the identity provider app.
- User selects a client app.
- An authorization request for the current active user in the IDP app is sent to a Salesforce authorization endpoint.
- Identity provider app communicates with the selected client app in the background, passing the username (
user_hint
). If the client app has the user, it tells the user that it’s ready to go, and the flow continues to step 6. - If the client app doesn’t have the user:
- Client app responds back to identity provider app to request an authentication code.
- Identity provider app gets the authentication code and sends it to the client app.
- Client app performs the refresh token exchange for the authentication code and communicates to the IDP app that it’s ready to go.
- The identity provider app swizzles to the client app, which is now logged in.