We are moving to version 6 of supertokens, and we are struggling with updating our third party imple...
f
We are moving to version 6 of supertokens, and we are struggling with updating our third party implementation. Is there any guide on how the new third party implementation should look like? ps. here is our code:
Copy code
return {
      id: SupportedLoginProviders.OFFICE365,
      get: (redirectURI, authCodeFromRequest) => {
        return {
          accessTokenAPI: {
            url: 'https://login.microsoftonline.com/common/oauth2/v2.0/token',
            params: {
              client_id: process.env.OFFICE365_APP_ID,
              client_secret: process.env.OFFICE365_CLIENT_SECRET,
              grant_type: 'authorization_code',
              redirect_uri: redirectURI || '',
              code: authCodeFromRequest || '',
            },
          },
          authorisationRedirect: {
            url: 'https://login.microsoftonline.com/common/oauth2/v2.0/authorize',
            params: {
              client_id: process.env.OFFICE365_APP_ID,
              scope: [
                'Calendars.ReadWrite',
                'OnlineMeetings.ReadWrite',
                'email',
                'openid',
                'profile',
                'User.Read',
                'offline_access',
              ].join(' '),
              response_type: 'code',
            },
          },
          getClientId: () => {
            return process.env.OFFICE365_APP_ID;
          },
          getProfileInfo: async (accessTokenAPIResponse: any) => {
            // redacted
          },
        };
      },
    };
r
f
I'm looking at docs, how can I access the accessTokenAPIResponse in userInfoMap?
Should I override getUserInfo?
r
For that, see our docs - get user info section