Ryan BaigOriginal post
Rank 2: Process
Error:
Plain text
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:
JavaScript
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 pageaccount.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);Summary
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.