interface OAuth2ProviderAuth<_ProviderUserAuth extends ProviderUserAuth> {
getAuthorizationUrl: () => Promise<readonly [url: URL, state: string | null]>;
validateCallback: (code: string) => Promise<_ProviderUserAuth>;
}
Generics#
getAuthorizationUrl()#
Creates a new authorization url, optional with a state.
const getAuthorizationUrl: () => Promise<readonly [url: URL, state: string | null]>;
Returns#
| name | type | description |
|---|
url | URL | authorization url |
state | string | null | state, if defined |
validateCallback()#
Validates the authorization code and returns a new ProviderUserAuth instance.
const validateCallback: (code: string) => Promise<_ProviderUserAuth>;
Parameters#
| name | type | description |
|---|
code | string | authorization code |
Returns#