For 3 days I no longer understand why redirects with Google Auth on React Native do not work at all. I saw people asking the problem but the solutions do not work for me. Please help me.
// ... code
const oauthProvider = { google: OAuthProvider.Google, apple: OAuthProvider.Apple, }[provider.toLowerCase()];
if (!oauthProvider) {
throw new Error(`Unsupported provider: ${provider}`);
}
const redirectSuccessUri = Linking.createURL("/");
const redirectFailureUri = Linking.createURL("/error");
const response = account.createOAuth2Token(
oauthProvider,
redirectSuccessUri,
redirectFailureUri
);
if (!response) {
throw new Error("Response is undefined");
}
// ... code
Recommended threads
- Need help in email verification - react ...
Hi, i am trying to verify user, but it is asking me a redirect link, and as i am creating an mobile app, i want it to be done in the app itself. Please if anybo...
- Multiple Set-Cookie headers collapsed on...
I’m deploying a Next.js 15 app to Appwrite → Deploy → Sites. In app/api/auth/login/route.ts I try to set 3 cookies. Variant A (manual headers): const headers ...
- session cookie not saving
it appears with my app hosted on Cloudflare worker pages, when i try to login it does not save the session cookie. however it saves in on localhost and no probl...