Skip to content

Latest commit

 

History

History
64 lines (44 loc) · 1.77 KB

File metadata and controls

64 lines (44 loc) · 1.77 KB

Function: useIdTokenResponseType()

💗 Help the project

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.


▸ useIdTokenResponseType(config): void

Configures the client to use the OpenID Connect Implicit Flow.

This changes the response_type used by the client to be id_token, this subsequently requires that the authorization server response be passed to implicitAuthentication (instead of authorizationCodeGrant) and for it to be one described by OpenID Connect 1.0 Implicit Flow.

Parameters

Parameter Type
config Configuration

Returns

void

Examples

Usage with a Configuration obtained through discovery

let server!: URL
let clientId!: string
let clientMetadata!: Partial<client.ClientMetadata> | undefined
let clientAuth = client.None()

let config = await client.discovery(
  server,
  clientId,
  clientMetadata,
  clientAuth,
  {
    execute: [client.useIdTokenResponseType],
  },
)

Usage with a Configuration instance

let config!: client.Configuration

client.useIdTokenResponseType(config)

See

OpenID Connect 1.0 Implicit Flow