Skip to content

fix(auth): redirect unverified users to email verification screen after sign-up - #69

Merged
CowboyGH merged 3 commits into
developfrom
fix/sign-up-unverified-email-redirect
May 23, 2026
Merged

CowboyGH merged 3 commits into
developfrom
fix/sign-up-unverified-email-redirect

Conversation

@CowboyGH

@CowboyGH CowboyGH commented May 23, 2026 •

Copy link
Copy Markdown
Owner

🚀 Summary

Previously, when a user tried to sign up with an already-registered but unverified email, the app responded with a generic error dialog and left them on the sign-up screen with no way forward. This PR introduces dedicated handling for EmailNotVerifiedFailure on the sign-up page, mirroring the behavior already present in the sign-in flow: a non-dismissible feedback dialog appears briefly, then after 2 seconds the app automatically pushes the verify-email route so the user can complete their confirmation without manually navigating there.

CowboyGH added 2 commits May 23, 2026 15:07
- Add `didChangeDependencies` to capture `_rootNavigator` once
- Cancel `_redirectTimer` in `dispose` to prevent navigation after widget is unmounted
- Pop the feedback dialog via `_rootNavigator` before pushing verify-email route
- Remove redundant `.then()` callback that could not fire (dialog was non-dismissible)
@coderabbitai

coderabbitai Bot commented May 23, 2026 •

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b401aa53-35e6-4bb7-a123-7afd08467721

📥 Commits

Reviewing files that changed from the base of the PR and between b254e75 and b1993a0.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • lib/features/auth/presentation/pages/sign_up_page.dart

📝 Walkthrough

Walkthrough

The PR updates SignUpPage to handle unverified-email sign-up failures with a distinct flow: when a sign-up attempt fails with EmailNotVerifiedFailure, the app displays a non-dismissible feedback dialog, waits 2 seconds, then closes the dialog and navigates to the verify-email route. The page state now manages a root navigator reference and a redirect timer, initializing the navigator in lifecycle setup and canceling the timer on widget disposal. All other sign-up failures continue to show the standard feedback dialog. The changelog documents these lifecycle and navigation improvements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • CowboyGH/moveUP-flutter#43: Both PRs implement the same unverified-email redirect pattern with a 2-second timed dialog dismissal and timer cleanup on dispose, applied to different auth pages (sign_up_page.dart vs sign_in_page.dart).

Suggested labels

area: ui/ux, type: bug, area: logic

Poem

🐰 A sign-up flow now shines so bright,
Two seconds of dialogue, then take flight!
Unverified emails redirect with care,
Timers and navigation, handled with flair! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main fix: closing the unverified email dialog before redirecting on sign-up. It is concise, specific, and directly relates to the primary change in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sign-up-unverified-email-redirect

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@CowboyGH CowboyGH self-assigned this May 23, 2026
@CowboyGH CowboyGH changed the title fix(auth): close unverified email dialog before redirecting on sign-up feat(auth): redirect unverified users to email verification screen after sign-up May 23, 2026
@CowboyGH CowboyGH added area: ui/ux Widgets, layout, animations, or design type: feature New feature or request type: bug Something isn't working area: logic State management and business logic and removed area: ui/ux Widgets, layout, animations, or design type: feature New feature or request labels May 23, 2026
@CowboyGH CowboyGH changed the title feat(auth): redirect unverified users to email verification screen after sign-up fix(auth): redirect unverified users to email verification screen after sign-up May 23, 2026
@CowboyGH
CowboyGH merged commit 04a844c into develop May 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: logic State management and business logic area: ui/ux Widgets, layout, animations, or design type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant