Creates a new authentication provider that can automatically refresh tokens.
The configuration object.
Readonly
onFires when a user's token is successfully refreshed.
The client ID.
Adds a user to the auth provider registry.
The ID of the user.
The initial token data.
Exchanges an authorization code for an access token and adds the user to the provider.
The authorization code.
Optional
scopes: string[]The authorization code.
Finds out the user associated to the given access token and adds them to the provider.
If you already know the ID of the user you are adding, consider using addUser instead.
The initial token data.
Gets the access token data for the given user.
The ID of the user to get the access token of.
Optional
scopes: string[]The list of required scopes that will be compared against the existing token scopes.
UnregisteredUserError if user is not registered in the provider.
MissingScopeError if user is not registered in the provider.
Gets the scopes for a user that are currently available using the access token.
If scopes were not set on user registration then it returns an empty array.
UnregisteredUserError if user is not registered in the provider.
Checks whether a user was added to the provider.
The user to check.
Refreshes the access token.
This method is optional to implement.
The ID of the user to refresh the access token of.
Remove all listeners.
Remove specific listener.
Listener to remove.
Remove callback function from given event.
Event where function might have been added to
Optional
callback: FunctionCallback function to remove from event
Removes a user from the auth provider registry.
The ID of the suer to add.
Generated using TypeDoc
An authentication provider implementation that uses user refresh tokens to automatically refresh the access token whenever necessary.