feat(auth-node): add OAuthAuthenticatorLogoutResult type for provider logout redirects

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Roebuck <jroebuck@spotify.com>
This commit is contained in:
Jonathan Roebuck
2026-03-31 13:31:23 +01:00
parent 9bfa74bbb5
commit fec31bdde5
2 changed files with 15 additions and 1 deletions
+1
View File
@@ -37,6 +37,7 @@ export {
type OAuthAuthenticator,
type OAuthAuthenticatorAuthenticateInput,
type OAuthAuthenticatorLogoutInput,
type OAuthAuthenticatorLogoutResult,
type OAuthAuthenticatorRefreshInput,
type OAuthAuthenticatorResult,
type OAuthAuthenticatorScopeOptions,
+14 -1
View File
@@ -76,6 +76,16 @@ export interface OAuthAuthenticatorLogoutInput {
req: Request;
}
/** @public */
export interface OAuthAuthenticatorLogoutResult {
/**
* If set, the frontend will redirect the browser to this URL after clearing
* the Backstage session. Use this to terminate provider-side sessions (e.g.
* Auth0's `/v2/logout` endpoint).
*/
logoutUrl?: string;
}
/** @public */
export interface OAuthAuthenticatorResult<TProfile> {
fullProfile: TProfile;
@@ -101,7 +111,10 @@ export interface OAuthAuthenticator<TContext, TProfile> {
input: OAuthAuthenticatorRefreshInput,
ctx: TContext,
): Promise<OAuthAuthenticatorResult<TProfile>>;
logout?(input: OAuthAuthenticatorLogoutInput, ctx: TContext): Promise<void>;
logout?(
input: OAuthAuthenticatorLogoutInput,
ctx: TContext,
): Promise<void | OAuthAuthenticatorLogoutResult>;
}
/** @public */