Add userinfo email scope for gcalendar plugin auth refresh to resolve 401

Signed-off-by: Benjamin <benjamin.mccain@onepeloton.com>
This commit is contained in:
Benjamin
2023-05-08 13:51:22 -04:00
parent 8cf2fc537a
commit f493ccb958
2 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-gcalendar': patch
---
Pass user info email scope on auth refresh to resolve invalid credentials error
+4 -1
View File
@@ -25,7 +25,10 @@ export const useSignIn = () => {
const signIn = useCallback(
async (optional = false) => {
const token = await authApi.getAccessToken(
'https://www.googleapis.com/auth/calendar.readonly',
[
'https://www.googleapis.com/auth/calendar.readonly',
'https://www.googleapis.com/auth/userinfo.email',
],
{
optional,
instantPopup: !optional,