diff --git a/.changeset/breezy-jobs-brake.md b/.changeset/breezy-jobs-brake.md new file mode 100644 index 0000000000..412cff3df5 --- /dev/null +++ b/.changeset/breezy-jobs-brake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Fix for refresh token being lost during Microsoft login. diff --git a/plugins/auth-backend/src/providers/github/provider.ts b/plugins/auth-backend/src/providers/github/provider.ts index 438cbca07b..2b0db9c2d9 100644 --- a/plugins/auth-backend/src/providers/github/provider.ts +++ b/plugins/auth-backend/src/providers/github/provider.ts @@ -54,12 +54,12 @@ export class GithubAuthProvider implements OAuthHandlers { }, ( accessToken: any, - refreshToken: any, + _refreshToken: any, params: any, fullProfile: any, done: PassportDoneCallback, ) => { - done(undefined, { fullProfile, params, accessToken, refreshToken }); + done(undefined, { fullProfile, params, accessToken }); }, ); } diff --git a/plugins/auth-backend/src/providers/gitlab/provider.ts b/plugins/auth-backend/src/providers/gitlab/provider.ts index 7c24757833..630cad0554 100644 --- a/plugins/auth-backend/src/providers/gitlab/provider.ts +++ b/plugins/auth-backend/src/providers/gitlab/provider.ts @@ -51,12 +51,12 @@ export class GitlabAuthProvider implements OAuthHandlers { }, ( accessToken: any, - refreshToken: any, + _refreshToken: any, params: any, fullProfile: any, done: PassportDoneCallback, ) => { - done(undefined, { fullProfile, params, accessToken, refreshToken }); + done(undefined, { fullProfile, params, accessToken }); }, ); } diff --git a/plugins/auth-backend/src/providers/microsoft/provider.ts b/plugins/auth-backend/src/providers/microsoft/provider.ts index 4dee90d4c6..e6157c1a83 100644 --- a/plugins/auth-backend/src/providers/microsoft/provider.ts +++ b/plugins/auth-backend/src/providers/microsoft/provider.ts @@ -72,7 +72,7 @@ export class MicrosoftAuthProvider implements OAuthHandlers { fullProfile: passport.Profile, done: PassportDoneCallback, ) => { - done(undefined, { fullProfile, accessToken, refreshToken, params }); + done(undefined, { fullProfile, accessToken, params }, { refreshToken }); }, ); }