shadowfang098
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")`. Kenny
What version of the sdk are you using, and are you self hosted or cloud?
Recommended threads
- Rate Limit of project
AppwriteException: Rate limit for the current endpoint has been exceeded. Please try again after some time. So , how much time I have to wait and why does it h...
- Update User Error
```ts const { users, databases } = await createAdminClient(); const session = await getLoggedInUser(); const user = await users.get(session.$id); if (!use...
- apple exchange code to token
hello guys, im new here 🙂 I have created a project and enabled apple oauth, filled all data (client id, key id, p8 file itself etc). I generate oauth code form...