Implements
OAuthClientProvider
Constructors
Constructor
Parameters
options?
OAuthOptions = {}
Returns
OAuth
Accessors
callbackServerPort
Get Signature
Returns
number | null
clientMetadata
Get Signature
Returns
Implementation of
redirectUrl
Get Signature
Returns
string | URL
Implementation of
Methods
_bind()
Parameters
serverUrl
string
Returns
void
clientInformation()
undefined if the client is not registered with the
server.
Returns
Promise<OAuthClientInformationMixed | undefined>
Implementation of
codeVerifier()
Returns
string
Implementation of
discoveryState()
undefined if none is cached.
When available, auth restores the discovery state (authorization server
URL, resource metadata, etc.) instead of performing RFC 9728 discovery, reducing
latency on subsequent calls.
Providers should clear cached discovery state on repeated authentication failures
(via invalidateCredentials with scope 'discovery' or 'all') to allow
re-discovery in case the authorization server has changed.
Returns
Promise<OAuthDiscoveryState | undefined>
Implementation of
invalidateCredentials()
Parameters
scope
"all" | "client" | "tokens" | "verifier" | "discovery"
Returns
Promise<void>
Implementation of
redirectToAuthorization()
Parameters
authorizationUrl
URL
Returns
Promise<void>
Implementation of
saveClientInformation()
clientInformation().
This method is not required to be implemented if client information is
statically known (e.g., pre-registered).
Parameters
info
OAuthClientInformationMixed
Returns
Promise<void>
Implementation of
saveCodeVerifier()
Parameters
codeVerifier
string
Returns
void
Implementation of
saveDiscoveryState()
auth calls.
This state can also be provided out-of-band (e.g., from a previous session or
external configuration) to bootstrap the OAuth flow without discovery.
Called by auth after successful discovery.
Parameters
state
OAuthDiscoveryState
Returns
Promise<void>
Implementation of
saveTokens()
Parameters
tokens
Returns
Promise<void>
Implementation of
tokens()
undefined if there are no saved tokens.
Returns
Promise<
| {
}
| undefined>
Implementation of
waitForCallback()
Parameters
timeoutMs?
number = ...
Returns
Promise<string>