matrix-js-sdk
    Preparing search index...

    Function startDeviceAuthorization

    • Begin OAuth2 device authorization flow.

      Parameters

      • options: {
            clientId: string;
            logger?: Logger;
            metadata: ValidatedAuthMetadata;
            scope: string;
        }

        The device authorization parameters.

        • clientId: string

          the client ID returned from client registration.

        • Optionallogger?: Logger

          optional logger to use for the request, defaults to the root logger of the js-sdk.

        • metadata: ValidatedAuthMetadata

          the validated OAuth2 metadata for the Identity Provider.

        • scope: string

          the scope to request for authorization.

      Returns Promise<DeviceAuthorizationResponse>

      a promise that resolves to a device access token response, or an error response if the user denies authorization or the device code expires.