Web Developer
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",
});
}