diff --git a/.changeset/tricky-months-hug.md b/.changeset/tricky-months-hug.md index 2f28ec1d63..ae1bd85532 100644 --- a/.changeset/tricky-months-hug.md +++ b/.changeset/tricky-months-hug.md @@ -5,4 +5,4 @@ '@backstage/plugin-auth-node': patch --- -Fix issue with `providerInfo` not being set properly for some auth providers, by making `providerInfo` an explicit optional return from `authenticate` +Fix issue with `providerInfo` not being set properly for some proxy providers, by making `providerInfo` an explicit optional return from `authenticate` diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md b/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md index 1cfca55e4a..2d464fbdb1 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md +++ b/plugins/auth-backend-module-oauth2-proxy-provider/api-report.md @@ -18,7 +18,7 @@ export const OAUTH2_PROXY_JWT_HEADER = 'X-OAUTH2-PROXY-ID-TOKEN'; // @public (undocumented) export const oauth2ProxyAuthenticator: ProxyAuthenticator< - unknown, + Promise, OAuth2ProxyResult, { accessToken: string; diff --git a/plugins/auth-backend-module-oauth2-proxy-provider/src/authenticator.ts b/plugins/auth-backend-module-oauth2-proxy-provider/src/authenticator.ts index 9d845d463a..fb124fef30 100644 --- a/plugins/auth-backend-module-oauth2-proxy-provider/src/authenticator.ts +++ b/plugins/auth-backend-module-oauth2-proxy-provider/src/authenticator.ts @@ -31,11 +31,7 @@ import { OAuth2ProxyResult } from './types'; export const OAUTH2_PROXY_JWT_HEADER = 'X-OAUTH2-PROXY-ID-TOKEN'; /** @public */ -export const oauth2ProxyAuthenticator = createProxyAuthenticator< - unknown, - OAuth2ProxyResult, - { accessToken: string } ->({ +export const oauth2ProxyAuthenticator = createProxyAuthenticator({ defaultProfileTransform: async (result: OAuth2ProxyResult) => { return { profile: {