Skip to content

fix: implement persistent auth session using expo-secure-store#305

Closed
Midoriya-w wants to merge 4 commits into
Dev-Card:mainfrom
Midoriya-w:fix/mobile-auth-persistence
Closed

fix: implement persistent auth session using expo-secure-store#305
Midoriya-w wants to merge 4 commits into
Dev-Card:mainfrom
Midoriya-w:fix/mobile-auth-persistence

Conversation

@Midoriya-w

Copy link
Copy Markdown
Contributor

Closes #264

Changes:

  • Implemented persistent auth session using expo-secure-store
  • Token is saved to secure storage on login
  • Token is restored automatically on app start via useEffect
  • User profile is re-fetched if saved token exists
  • Token is cleared from secure storage on logout
  • If saved token is invalid/expired, storage is cleared automatically
  • Replaces all TODO placeholders with working implementation

@Harxhit Harxhit added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label May 24, 2026
@Harxhit Harxhit requested a review from ShantKhatri May 24, 2026 17:05
@Harxhit

Harxhit commented May 24, 2026

Copy link
Copy Markdown
Collaborator

@ShantKhatri Could please look into this.

@ShantKhatri

Copy link
Copy Markdown
Contributor

@ShantKhatri Could please look into this.

Sure.

@ShantKhatri

Copy link
Copy Markdown
Contributor

Hi @Midoriya-w , allow some more time for this pr, as I need to test some other functionality and edge cases too. Thanks!

@Midoriya-w

Copy link
Copy Markdown
Contributor Author

Hi @Midoriya-w , allow some more time for this pr, as I need to test some other functionality and edge cases too. Thanks!

sure take your time!

@ShantKhatri

Copy link
Copy Markdown
Contributor

Hi @Midoriya-w , we are strictyly moved from expo, and our strict policy on not using any expo deps.

@Midoriya-w

Midoriya-w commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

hey @ShantKhatri Thanks for reviewing.

I understand. Since the project has moved away from Expo dependencies, I'll update the implementation to use the existing AsyncStorage solution already present in the mobile app and push the changes shortly.

@github-actions

github-actions Bot commented Jun 1, 2026

Copy link
Copy Markdown

CI Results — ❌ Some checks failed

Check Status
🖥️ Backend ⏭️ Skipped — no changes detected
📱 Mobile ❌ failure
🌐 Web ⏭️ Skipped — no changes detected

⏭️ Skipped means no files were changed in that area — the check was not needed.


🕐 Last updated: Mon, 01 Jun 2026 18:46:28 GMT

@Midoriya-w

Copy link
Copy Markdown
Contributor Author

hey @ShantKhatri Tested locally.

Verified that the implementation now uses AsyncStorage instead of Expo Secure Store and the auth session persistence flow works as expected.

No blocking issues found from my side.

@Midoriya-w

Copy link
Copy Markdown
Contributor Author

Hi @ShantKhatri, I've updated the PR to replace Expo Secure Store with AsyncStorage as requested. My branch is synced with the latest main and there are no merge conflicts locally. Could you please recheck the PR when you get a chance? Thanks!

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

CI — All Checks Passed

Backend — SKIP

Check Result
Lint -
Test -
Typecheck -

Mobile — PASS

Check Result
Lint PASS
Test PASS

Web — SKIP

Check Result
Check -
Build -

Last updated: Sat, 06 Jun 2026 12:20:40 GMT

@Midoriya-w Midoriya-w force-pushed the fix/mobile-auth-persistence branch from aa2f35b to 2da8d69 Compare June 6, 2026 12:19
@vercel

vercel Bot commented Jun 6, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel.

A member of the Team first needs to authorize it.

Signed-off-by: dinesh <midoriya54378@gmail.com>
@Midoriya-w

Copy link
Copy Markdown
Contributor Author

hey @ShantKhatri can you check on this pr.

@ShantKhatri

Copy link
Copy Markdown
Contributor

Changes here are not relevant to issue, so closing this PR.

@ShantKhatri ShantKhatri closed this Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile auth session is not persisted across app restarts

3 participants