Error:
TypeScript
at o.<anonymous> (https://cdn.jsdelivr.net/npm/appwrite@16.0.0:7:7420)
at Generator.next (<anonymous>)
at s (https://cdn.jsdelivr.net/npm/appwrite@16.0.0:7:111)
Code:
TypeScript
const client = new Appwrite.Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('ipfetcher-bot'); // Your project ID
const account = new Appwrite.Account(client);
// Go to OAuth provider login page
account.createOAuth2Session(
Appwrite.OAuthProvider.Google, // provider
'https://ip-fetcher-bot.ryanbaig.vercel.app/api/success', // redirect here on success
'https://ip-fetcher-bot.ryanbaig.vercel.app/api/failure' // redirect here on failure
);
TL;DR
Google OAuth2 authentication is failing with an 'Invalid redirect' error in the provided code. The issue could be due to incorrect redirect URLs. Make sure the redirect URLs are correctly configured in the OAuth provider settings and in the code snippet. Check the URLs 'https://ip-fetcher-bot.ryanbaig.vercel.app/api/success' and 'https://ip-fetcher-bot.ryanbaig.vercel.app/api/failure' for accuracy.Recommended threads
- I reached my budget limit how?
Hi, I got a message saying I reached my budget limit already? Makes no sense? In 4 days I reached 3.4M reads in a project how with only 100 users? This is my pr...
- Startup credits or promo code inquiry fo...
Hello Appwrite team, Happy New Year! I hope you’re all doing well. I’m currently exploring backend solutions for a new SaaS project and Appwrite came highly re...
- Console down yet again ?
Seeing it stuck on the "loading" screen yet again ... second time today. (last time 10+ hours ago). 'roles' and 'plan' requests just hung. Meanwhile, appwrit...