Backstage
    Preparing search index...

    Provides helpers for implemented OAuth login flows within Backstage.

    type OAuthRequestApi = {
        authRequest$(): Observable<PendingOAuthRequest[]>;
        createAuthRequester<OAuthResponse>(
            options: OAuthRequesterOptions<OAuthResponse>,
        ): OAuthRequester<OAuthResponse>;
    }

    Implemented by

    Index

    Methods

    • Observers pending auth requests. The returned observable will emit all current active auth request, at most one for each created auth requester.

      Each request has its own info about the login provider, forwarded from the auth requester options.

      Depending on user interaction, the request should either be rejected, or used to trigger the auth handler. If the request is rejected, all pending AuthRequester calls will fail with a "RejectedError". If a auth is triggered, and the auth handler resolves successfully, then all currently pending AuthRequester calls will resolve to the value returned by the onAuthRequest call.

      Returns Observable<PendingOAuthRequest[]>