Add Microsoft Oauth2 Integration
Created by: deepakduggirala
Description
Add Microsoft Oauth2 Integration and "Login with Microsoft" option
Changes Made
List the main changes made in this PR. Be as specific as possible.
Followed the same template as Google OAuth2 feature.
UI:
- Add UI route for Microsoft Oauth2 redirect
- Save code_verifier to localstorage and send it back with /token
- Add state methods and services required for login with microsoft
API:
-
new routes /auth/microsoft/url and /auth/microsoft/verify
-
Follow RFC7637 to generate
code_verifier
andcode_challenge
usingnode:crypto
library -
On receiving access token from /token, call
https://graph.microsoft.com/v1.0/me
to get user details. -
Feature added -
Bug fixed -
Code refactored -
Tests changed -
Documentation updated -
Other changes: [describe]
Screenshots (if applicable)
https://github.com/user-attachments/assets/7f282bce-2d7f-4d46-9524-087a7e6c5310
Checklist
Before submitting this PR, please make sure that:
-
Your code passes linting and coding style checks. -
Documentation has been updated to reflect the changes. -
You have reviewed your own code and resolved any merge conflicts. -
You have requested a review from at least one team member. -
Any relevant issue(s) have been linked to this PR.
Additional Information
Tested in bioloop-dev
Create OAuth2 client (called Application in MSFT parlance) using link
Secret expires on 3/6/2027