-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix verify email flow bug for duplicate access token calls #3440
Conversation
WalkthroughIn a stylish code transformation, the Changes
Possibly related PRs
Suggested Labels
Suggested Reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🔇 Additional comments (4)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
PR description must contain a link to a ClickUp (case-insensitive) |
1 similar comment
PR description must contain a link to a ClickUp (case-insensitive) |
PR description must contain a link to a ClickUp (case-insensitive) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/app/auth/verify/verify.page.ts
(1 hunks)
🧰 Additional context used
🪛 eslint
src/app/auth/verify/verify.page.ts
[error] 29-29: 'resp' is defined but never used.
(@typescript-eslint/no-unused-vars)
🪛 GitHub Check: Run linters
src/app/auth/verify/verify.page.ts
[failure] 29-29:
'resp' is defined but never used
🪛 GitHub Actions: Lint
src/app/auth/verify/verify.page.ts
[error] 29-29: Variable 'resp' is defined but never used
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build (12.x)
src/app/auth/verify/verify.page.ts
Outdated
@@ -26,7 +26,7 @@ | |||
this.routerAuthService | |||
.emailVerify(verificationCode) | |||
.pipe( | |||
switchMap((resp) => this.authService.newRefreshToken(resp.refresh_token)), | |||
switchMap((resp) => this.authService.refreshEou()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ayyo! Unused variable alert, thalaiva!
"resp" isn't required anymore, boss. The linter is screaming at us because we define "resp" but never use it. Remove it from the function signature to keep your code clean and ensure the pipeline passes.
Here's the fix, macha:
- switchMap((resp) => this.authService.refreshEou()),
+ switchMap(() => this.authService.refreshEou()),
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
switchMap((resp) => this.authService.refreshEou()), | |
switchMap(() => this.authService.refreshEou()), |
🧰 Tools
🪛 eslint
[error] 29-29: 'resp' is defined but never used.
(@typescript-eslint/no-unused-vars)
🪛 GitHub Check: Run linters
[failure] 29-29:
'resp' is defined but never used
🪛 GitHub Actions: Lint
[error] 29-29: Variable 'resp' is defined but never used
@@ -26,7 +26,7 @@ export class VerifyPage implements OnInit { | |||
this.routerAuthService | |||
.emailVerify(verificationCode) | |||
.pipe( | |||
switchMap((resp) => this.authService.newRefreshToken(resp.refresh_token)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
everything being done in this.authService.newRefreshToken()
call is already done in the emailVerify
method in line 27 except refreshEou()
.
This takes care of 401 issues during email verify flow: https://fylein.slack.com/archives/C017C400V37/p1736916713193809
|
Clickup
https://app.clickup.com/t/86cxta2mz
Code Coverage
Please add code coverage here
UI Preview
Slack Thread
Summary by CodeRabbit
Summary by CodeRabbit