Skip to content

Conversation

@ManuViola77
Copy link

Jira board reference:


What does this do?

This PR implements the use of Protected Routes to have separate stacks for authenticated/not authenticated.

It has 3 protected stacks:

  • The Onboarding with guard isFirstTime
  • Authenticated with guard isAuthenticated
  • Not authenticated with guard ! isAuthenticated

Also removes the push routes to '/' when success sign in/sign up, since now the protected guards will automatically change stacks when the isAuthenticated changes.


Why did you do this?

There was a bug where after sign in/sign up you could go back to a login screen by swiping, while you were actually already logged in.

Also, its good to have separate stacks to avoid accessing screens you shouldn't.

Who/what does this impact?

The App navigation (layout), now it starts in the onboarding if it wasn't shown yet, and then if its authenticated then it shows the authenticated stack (starting in the feed), otherwise it shows the not authenticated stack (starting with sign in screen).

How did you test this?

  • Tested on iOS
  • Tested on Android
  • Tested on a small device
  • Tested on a real device
  • Tested all flows related with this PR changes
  • Tested accessibility
  • Added tests

Notes:


Screenshots / Previews

Before:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-10-31.at.10.47.59.mp4

After:

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-10-31.at.10.40.52.mp4

🧑‍🎨 Figma Design:

📱 Android:

📱 iOS:

@ManuViola77 ManuViola77 requested a review from a team as a code owner October 31, 2025 13:49
@ManuViola77 ManuViola77 requested review from asdolo, fernandatoledo and guillermomachado and removed request for a team October 31, 2025 13:49
@github-actions
Copy link

github-actions bot commented Oct 31, 2025

💯 Test Coverage

Lines Statements Branches Functions
Coverage: 49%
49.56% (342/690) 44.04% (122/277) 36.28% (86/237)

😎 Tests Results

Tests Skipped Failures Errors Time
77 0 💤 0 ❌ 0 🔥 29.731s ⏱️
👀 Tests Details • (49%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files49.5644.0436.2849.92 
app0000 
   _layout.tsx000023–118
   sign-in.tsx0100009–16
   sign-up.tsx01000010–18

Copy link
Collaborator

@fernandatoledo fernandatoledo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yay!

Copy link

@jpirazusta jpirazusta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 👏

@ManuViola77 ManuViola77 enabled auto-merge November 5, 2025 20:18
@ManuViola77 ManuViola77 merged commit c2ae678 into master Nov 5, 2025
8 checks passed
@ManuViola77 ManuViola77 deleted the feat/use-protected-routes branch November 5, 2025 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants