feat: Phising resistant MFA#39760
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #39760 +/- ##
===========================================
+ Coverage 69.66% 69.71% +0.05%
===========================================
Files 3317 3304 -13
Lines 121912 121729 -183
Branches 21799 21556 -243
===========================================
- Hits 84926 84863 -63
+ Misses 33669 33598 -71
+ Partials 3317 3268 -49
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
d1667e4 to
c558ae5
Compare
| async (req: Request, res: Response) => { | ||
| const oAuthUser = req.user as IUser; | ||
|
|
||
| if (!oAuthUser) { | ||
| return res.redirect('/login'); | ||
| } | ||
|
|
||
| const { loginClient } = req.session; | ||
|
|
||
| const stampedToken = Accounts._generateStampedLoginToken(); | ||
| await Accounts._insertLoginToken(oAuthUser._id, stampedToken); | ||
|
|
||
| const redirectUrl = new URL(`/home`, siteUrl); | ||
|
|
||
| redirectUrl.searchParams.set('resumeToken', stampedToken.token); | ||
| redirectUrl.searchParams.set('userId', oAuthUser._id); | ||
|
|
||
| if (loginClient) { | ||
| redirectUrl.searchParams.set('loginClient', loginClient); | ||
| } | ||
|
|
||
| res.redirect(redirectUrl.toString()); | ||
|
|
||
| req.session.destroy((err) => { | ||
| if (err) { | ||
| console.error('Error destroying session', err); | ||
| } | ||
| }); | ||
| }, |
Co-authored-by: Ricardo Garim <rswarovsky@gmail.com>
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments