access_token from the /token endpoint.
Provides an identity token from the Open ID connect provider.
Returns a cached value if there's sufficient time left until the id_token expires. If the id_token is about to expire a fresh token is fetched.
parsed id_token from the /token endpoint.
StaticcreateCreates an Open ID Connect client that uses refresh tokens. Expects callbackState to be the values from the callback caused by loginWithRedirect.
See https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow
specifies which Open ID provider to login with and the client credentials
code and state received from the query parameters in the callback caused by loginWithRedirect
OptionalcreateDependencies: CreateDependenciesdependency injection
an Open ID Connect client that uses refresh tokens
const options: OpenIdConnectClientOptions = {
clientId: '<client-id>',
openIdProviderUrl: 'http://my/idp'
};
const callbackState = inferLoginCallbackStateFromUrl(window.location.href);
if (isSuccessfulLoginCallbackState(callbackState)) {
const client = await OpenIdConnectClient.create(options, callbackState);
const token = await client.getToken();
} else {
// ...
}
StaticcreateOptionalcode_verifier: stringOptionalredirect_uri: stringOptionalfetch: typeof fetchStaticloginInitializes the login with redirect for code flow with the Open ID provider specified in clientOptions. The returned promise will never resolve. Awaiting the return value will block the continued execution of the promise chain.
See https://auth0.com/docs/get-started/authentication-and-authorization-flow/add-login-auth-code-flow
specifies which Open ID provider to login with
OptionalloginWithRedirectDependencies: Partial<LoginWithRedirectDependencies>dependency injection
an unfulfilled promise that will never resolve
Provides an access token from the Open ID connect provider.
Returns a cached value if there's sufficient time left until the access_token expires. If the access_token is about to expire a fresh token is fetched.