Skip to main content

AuthProviderRouteHandlers.refresh()

Home > @backstage/plugin-auth-node > AuthProviderRouteHandlers > refresh

(Optional) If the auth provider supports refresh tokens then this method handles requests to get a new access token.

Other types of providers may also use this method to implement its own logic to create new sessions upon request. For example, this can be used to create a new session for a provider that handles requests from an authenticating proxy.

Request - to contain a refresh token cookie and scope (Optional) query parameter. Response - payload with accessToken, expiryInSeconds?, idToken?, scope and user profile information.

Signature:

refresh?(req: Request, res: Response): Promise<void>;

Parameters

ParameterTypeDescription
reqRequest
resResponse

Returns:

Promise<void>