OAuthRequester
Home > @backstage/core-plugin-api
> OAuthRequester
Function used to trigger new auth requests for a set of scopes.
Signature:
export type OAuthRequester<TAuthResponse> = (scopes: Set<string>) => Promise<TAuthResponse>;
Remarks
The returned promise will resolve to the same value returned by the onAuthRequest in the OAuthRequesterOptions. Or rejected, if the request is rejected.
This function can be called multiple times before the promise resolves. All calls will be merged into one request, and the scopes forwarded to the onAuthRequest will be the union of all requested scopes.