loginWithWebView

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

Description

We recommend using the standard native login or loginWithWeb. Proceed with caution while using this particular method for user authentication.

Why don’t you recommend loginWithWebView? 🤔

Primarly because it’s an insecure way of handling the login. It is also not compliant with Google’s secure browser policy.

Opens an insecure webview through the authorization endpoint:

  • If end-users have an active in-app SSO session, the authorization endpoint immediately redirects to the application.

    The SSO session being within the webview itself.

  • If end-users do not have an active in-app SSO session, they are redirected to the client’s Login URL for authentication.

  • You must have configured a Login URL and enabled request orchestration tokens for 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.

Examples

client.loginWithWebView(
    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.