I'm currently working on a project using Next.js and have set up Google OAuth authentication. The consent screen flow is functioning correctly, and it redirects users to the target redirect URI, /success
. However, I'm not receiving the expected session data, and I'm unsure what's going wrong. I've looked through similar issues in the threads and saw a suggestion to enable the allow third-party cookie
setting, which I have done, but the issue persists. Although user data is available in the Appwrite console, I'm not getting the results I expected.
await account.createOAuth2Session(
OAuthProvider.Google,
redirectUri,
failureUri,
["email", "profile", "openid"]
);
} catch (error) {
console.error("OAuth session creation failed:", error);
toast({
title: "Oh no!",
description: "Something went wrong! Please try again later.",
variant: "destructive",
});
}
Recommended threads
- Issue with Authentication
I am stuck with authentication using appwrite. I am getting bad request 400 error when trying to register though we already have project, database, collection c...
- getaddrinfo EAI_AGAIN when using axios
I have this code to make a get request to an API ```javascript function fetchUserListPerPage(page) { return new Promise(async (resolve, reject) => { ...
- Appwrite CLI not working as expected
Until yesterday I was authenticated in my Appwrite instance through the CLI, and I was able to get my functions and deploy them manually. Today, when I went ba...