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.
▸ pollBackchannelAuthenticationGrant(config
, backchannelAuthenticationResponse
, parameters
?, options
?): Promise
<TokenEndpointResponse
& TokenEndpointResponseHelpers
>
Continuously polls the token endpoint until the end-user finishes the Client-Initiated Backchannel Authentication Grant process
Note: URL of the authorization server's token endpoint must be configured.
Parameter | Type | Description |
---|---|---|
config |
Configuration |
- |
backchannelAuthenticationResponse |
BackchannelAuthenticationResponse |
Backchannel Authentication Response obtained from initiateBackchannelAuthentication |
parameters ? |
Record <string , string > | URLSearchParams |
Additional parameters that will be sent to the token endpoint, typically used for parameters such as scope and a resource (Resource Indicator) |
options ? |
BackchannelAuthenticationGrantPollOptions |
- |
Promise
<TokenEndpointResponse
& TokenEndpointResponseHelpers
>
let config!: client.Configuration
let scope!: string
let login_hint!: string // one of login_hint, id_token_hint, or login_hint_token parameters must be provided in CIBA
let backchannelAuthenticationResponse =
await client.initiateBackchannelAuthentication(config, {
scope,
login_hint,
})
// OPTIONAL: If your client is configured with Ping Mode you'd invoke the following after getting the CIBA Ping Callback (its implementation is framework specific and therefore out of scope for openid-client)
let { auth_req_id } = backchannelAuthenticationResponse
let tokenEndpointResponse =
await client.pollBackchannelAuthenticationGrant(
config,
backchannelAuthenticationResponse,
)