Optional
accessOptional
idOptional
idOptional
issuer_Optional
refreshOptional
scopesOptional
userInitialize the library with this method. It resolves issuer configuration, jwks keys which are necessary for validating tokens returned from provider and checking if a user is already authenticated in provider.
Make this false
if you don't want to check user authorization status in provider while
initializing. Defaults to true
Redirect to provider's authorization endpoint using provided parameters. You can override any parameter defined
in OIDCClient
. If you don't provide state
, nonce
or code_verifier
they will be generated automatically
in a random and secure way.
After a user successfully authorizes an application, the authorization server will redirect the user back to the application with either an authorization code or access token in the URL. In the callback page you should call this method.
Full url which contains authorization request result parameters. Defaults to window.location.href
Open a popup with the provider's authorization endpoint using provided parameters. You can override any
parameter defined in OIDCClient
. If you don't provide state
, nonce
or code_verifier
they will be
generated automatically in a random and secure way. You can also override popup options.
NOTE: Most browsers block popups if they are not happened as a result of user actions. In order to display login popup you must call this method in an event handler listening for a user action like button click.
Redirect to provider's end_session_endpoint
with provided parameters. After logout provider will redirect to
provided post_logout_redirect_uri
if it provided.
Optional
event: EventTypesOptional
fn: (...args: any[]) => voidOAuth2 token revocation implementation method. See more at tools.ietf.org/html/rfc7009
Token to be revoked
Passed token's type. It will be used to provide token_type_hint
parameter.
If necessary override options passed to OIDCClient
by defining them here.
Login without having an interaction. If refresh tokens are used and there is a stored refresh token it will
exchange refresh token to receive new access token. If not it silently makes a request the provider's
authorization endpoint using provided parameters. You can override any parameter defined in OIDCClient
. If
you don't provide state
, nonce
or code_verifier
they will be generated automatically in a random and
secure way.
OIDCClient
provides methods for interacting with OIDC/OAuth2 authorization server. Those methods are signing a user in, signing out, managing the user's claims, checking session and managing tokens returned from the OIDC/OAuth2 provider.