ping-identity
    Preparing search index...

    Function deviceOpenVerificationUrl

    Open a device authorization verification URL in the on-device browser.

    Mirrors the native SDK's device-client browser launch: iOS presents the URL in an SFSafariViewController, Android launches a Custom/Auth Tab. The device authorization polling loop (started with OidcDeviceClient.authorize) keeps running while the browser is open, so completing or dismissing the browser does not stop the flow. Dismissing the browser resolves to { type: 'cancel' }; it does not cancel the underlying authorization.

    Device client handle returned by createOidcDeviceClient.

    Verification URI (prefer verificationUriComplete from the started status so the user code is prefilled).

    { type: 'success' } when the browser flow completed, or { type: 'cancel' } when the user dismissed the browser.

    OidcError with state_error when the client has been disposed, or with argument_error when verificationUri is blank.

    OidcError when the native browser launch fails (for example an invalid URL or a missing redirectUri scheme on iOS).

    const client = createOidcDeviceClient(config);
    const stop = await client.authorize(status => {
    if (status.type === 'started' && status.response.verificationUriComplete) {
    void deviceOpenVerificationUrl(client, status.response.verificationUriComplete);
    }
    });
    • Open a device authorization verification URL in the on-device browser.

      Parameters

      • client: OidcDeviceClient

        Device client handle returned by createOidcDeviceClient.

      • verificationUri: string

        Verification URI (prefer verificationUriComplete from the started status so the user code is prefilled).

      Returns Promise<OidcAuthorizeResult>

      { type: 'success' } when the browser flow completed, or { type: 'cancel' } when the user dismissed the browser.

      Mirrors the native SDK's device-client browser launch: iOS presents the URL in an SFSafariViewController, Android launches a Custom Tab / Auth Tab. The device authorization polling loop (started with OidcDeviceClient.authorize) keeps running while the browser is open, so completing or dismissing the browser does not stop the flow. Dismissing the browser resolves to { type: 'cancel' }; it does not cancel the underlying authorization.

      OidcError with argument_error when verificationUri is blank, or with state_error when the client has been disposed.

      OidcError when the native browser launch fails (for example an invalid URL or a missing redirectUri scheme on iOS).