New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expo - React Native - Auth session missing! #25827
Labels
bug
Something isn't working
Comments
Maybe I'm missing something about states, react component mounting, or something else that I don't have any idea. |
I'm trying to update the session from user on this useEffect(() => {
(async () => {
const url = await Linking.getInitialURL();
if (url?.includes("reset-password")) {
const transformedUrl = parseSupabaseUrl(url);
const parsedUrl = Linking.parse(transformedUrl);
const accessToken = parsedUrl.queryParams?.access_token;
const refreshToken = parsedUrl.queryParams?.refresh_token;
if (
typeof accessToken === "string" &&
typeof refreshToken === "string"
) {
try {
const { data, error } = await supabase.auth.setSession({
access_token: accessToken,
refresh_token: refreshToken,
});
await supabase.auth.refreshSession();
if (error) throw error;
setSession(data.session);
setUser(session ? session.user : null);
if (data.session) {
router.replace("/(app)/settings/reset-password/");
}
} catch (error) {
console.error("Failed to set session:", error);
}
}
}
})();
}, []); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Describe the bug
I'm trying to reset a password for a user, but every time I attempt to update the password, Supabase returns an error message saying 'Auth session missing!', even though I have already set a new session
To Reproduce
Expected behavior
Once the user is inside the app, he should be able to reset the password.
Screenshots
Here is the print showing the email:
Here is the moment after I clicked on the link:
Here is the moment after I clicked on open:
More informations
Here is my Supabase Context:
System information
The text was updated successfully, but these errors were encountered: