Skip to content

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

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

fix: implement persistent auth session using expo-secure-store#305
Midoriya-w wants to merge 3 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
Copy link
Copy Markdown
Collaborator

Harxhit commented May 24, 2026

@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
Copy link
Copy Markdown
Contributor Author

Midoriya-w commented Jun 1, 2026

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
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

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!

Signed-off-by: dinesh <midoriya54378@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

CI — Checks Failed

Backend — SKIP

Check Result
Lint -
Test -
Typecheck -

Mobile — FAIL

Check Result
Lint FAIL
Test PASS

Web — SKIP

Check Result
Check -
Build -

Last updated: Thu, 04 Jun 2026 17:42:05 GMT

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