Trying to create a google OAuth for a nextjs app, the method call looks like this:
TypeScript
account.createOAuth2Session("google", "http://localhost:3000/dashboard","http://localhost:3000")
}}```
and getting this error: `Argument of type '"google"' is not assignable to parameter of type 'OAuthProvider'`
TL;DR
Developers are experiencing an issue with Google OAuth in a Next.js app. The error suggests a type mismatch in the method call. The solution is to check the version of the SDK being used and hosting details. The method call should be `account.createOAuth2Session(OAuthProvider.GOOGLE, "http://localhost:3000/dashboard", "http://localhost:3000")`.What version of the sdk are you using, and are you self hosted or cloud?
Recommended threads
- Appwrite Push Notifications: "Unknown er...
Hi all, I'm running into an issue with Appwrite push notifications in my web project. When I try to manually send a notification to a user from the Appwrite we...
- Custom email templates not working
Hey there, I've tried to add custom email templates to my appwrite auth's emails (password reset, email verification, session emails). I added my own html/css a...
- Realtime fails to connect/reconnect
I have been having trouble with my appwrite realtime connection for a few days now. Before the code that was working fine now is giving failed to connect errors