A newer version of this documentation is available.

View Latest

loginWithWeb

client.loginWithWeb(
    activity = this,
    // Optional arguments
    state = "state",
    nonce = "nonce",
    origin = "origin"
)

About this command

Opens a custom tab through the authorization endpoint:

  • 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 version 1.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",
)

Parameters

activity Activity

The Android activity.

origin string

Free text parameter describing the source of the login (only for reporting purposes).

state string

An OAuth2 state value.

nonce string

An OIDC nonce value.

Response

Type: Unit

ReachFiveError

message string

The message of the error.

getErrorCode() ErrorCode

The error code’s enumeration value.

code string

The HTTP status code or SDK error code.

exception string

The stack trace of the error.

data ReachFiveApiError

Additional data about the error.

error string

The main error message.

errorId string

The identifier of the error.

errorUserMsg string

The user-friendly error message.

This property is translated according to the user’s browser settings. Currently supported languages:
Currently supported languages
  • ar - العربية Arabic

  • de - Deutsch German

  • en - English

  • es - Español Spanish

  • fr - Français French

  • hu - Magyar Hungarian

  • it - Italiano Italian

  • jp - 日本 Japanese

  • ko - 한국인 Korean

  • nl - Nederlands Dutch

  • pt - Portuguese

  • ru - Ру́сский Russian

  • sk - Slovenský Slovak

  • zh-CN - People’s Republic of China Simplified Chinese

  • zh-Hans - Simplified Chinese

  • zh-Hant - Traditional Chinese

  • zh-HK - Hong Kong Traditional Chinese

  • zh-MO - Macao Traditional Chinese

  • zh-SG - Singapore Simplified Chinese

  • zh-TW - Taiwan Traditional Chinese

errorMessageKey string

The technical error code.

errorDescription string

The technical error message.

errorDetails ReachFiveApiErrorDetails

  • field - The field concerned by the error.

  • message - The message error returned for the field.