fdundjer
08/07/2023, 1:14 PMreturn {
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
},
};
},
};
rp_st
08/07/2023, 1:16 PMfdundjer
08/07/2023, 1:24 PMfdundjer
08/07/2023, 1:25 PMrp_st
08/07/2023, 2:38 PMSuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by