auth-backend: fix for refresh token being lost during microsoft login

This commit is contained in:
Patrik Oldsberg
2021-02-22 17:52:15 +01:00
parent f7b951d9f5
commit ec504e7b4d
4 changed files with 10 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-backend': patch
---
Fix for refresh token being lost during Microsoft login.
@@ -54,12 +54,12 @@ export class GithubAuthProvider implements OAuthHandlers {
},
(
accessToken: any,
refreshToken: any,
_refreshToken: any,
params: any,
fullProfile: any,
done: PassportDoneCallback<OAuthResult>,
) => {
done(undefined, { fullProfile, params, accessToken, refreshToken });
done(undefined, { fullProfile, params, accessToken });
},
);
}
@@ -51,12 +51,12 @@ export class GitlabAuthProvider implements OAuthHandlers {
},
(
accessToken: any,
refreshToken: any,
_refreshToken: any,
params: any,
fullProfile: any,
done: PassportDoneCallback<OAuthResult>,
) => {
done(undefined, { fullProfile, params, accessToken, refreshToken });
done(undefined, { fullProfile, params, accessToken });
},
);
}
@@ -72,7 +72,7 @@ export class MicrosoftAuthProvider implements OAuthHandlers {
fullProfile: passport.Profile,
done: PassportDoneCallback<OAuthResult, PrivateInfo>,
) => {
done(undefined, { fullProfile, accessToken, refreshToken, params });
done(undefined, { fullProfile, accessToken, params }, { refreshToken });
},
);
}