loginWithWeb
About this command
Opens a custom tab through the authorization endpoint.
When the Include SSO tokens in token endpoint response option is enabled in the ReachFive Console on your client, session cookies are included in the /oauth/token
response and added to the app’s cookie jar, allowing webviews inside the app to access the SSO session initiated by the browser enhancing session continuity across custom tabs, app views, and web views.
Custom tab SSO sessions and app/webview SSO sessions are distinct.
logout always kills the app/webview’s SSO session.
With the logout method’s ssoCustomTab parameter, it also kills the browser’s session.
|
-
If end-users have an active web SSO session, then the authorization endpoint will immediately redirect to the application.
-
If end-users do not have an active web SSO session, then they will be redirected to the client’s Login URL for authentication.
For more on this, see the request orchestration documentation.
-
You must have configured a Login URL and enabled request orchestration tokens in your identity client.
Orchestrated flows are supported from version
1.24.0
for the Core SDK and version1.16.0
for the UI SDK. -
Ensure your application is properly configured to open Custom Tabs, see Web-based Flows Configuration.
Once end-users have authenticated on the web, the ReachFive authorization server will redirect back to your application with an authorization code.
Automatically complete the flow by calling onLoginActivityResult
in your activity’s onActivityResult
override.
Examples
client.loginWithWeb(
activity = this,
state = "state",
nonce = "nonce",
origin = "origin",
)
Response
Type: Unit
ReachFiveError
message |
The message of the error. |
||||||||||||||
getErrorCode() |
The error code’s enumeration value. |
||||||||||||||
code |
The HTTP status code or SDK error code. |
||||||||||||||
exception |
The stack trace of the error. |
||||||||||||||
data |
Additional data about the error.
|