Merge pull request #17704 from benjmac/plugin-gcalendar-scope-fix

fix(plugin-gcalendar): Add userinfo email scope for gcalendar plugin auth refresh to resolve 401
This commit is contained in:
Fredrik Adelöw
2023-05-10 12:18:50 +02:00
committed by GitHub
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,