Programmatically force convex to reload and re authenticate ?
Is there a way to force the Convex auth provider to refresh? I’m almost done building a full-stack monorepo using Next.js and Capacitor, leveraging the full capabilities of Convex, including authentication. Everything works fine until the iOS WebView gets killed in the background to save memory. As a result, when the user returns to the app after a period of inactivity, they end up in a stale state and are stuck on a loading screen. The only way to resolve this is by clearing the app from the background and reopening it, at which point it re authenticates correctly. Next Js
2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Starting with the issue, helpful to hear, another user reported something similar a few days ago.
For your solution, what does forcing the Convex auth provider to refresh mean?
What I think ending up in a stale state means here is the customer comes back to the app and it reloads, and the reauthorization process fails somehow.
The reauthorization process failing is the thing I'm going to investigate.
Can you say more to help me make a reproduction, you mention Next Js — are you using Next.js?
Is this app viewable or installable publicly?