I've tried many things: referred blogs,videos but it still doesnt work properly.
Here's the login function i'm using within my appwrite.ts file: export const loginWithGoogle = async () => { try { await account.createOAuth2Session( OAuthProvider.Google, 'http://localhost:3000/home', 'http://localhost:3000/fail' )
} catch (error) {
console.error('OAuth login error:', error);
}
}
It suddenly worked and an entry was made into the "Auth" in my appwrite dashboard but I couldnt access any session params. I've attached an image of the error as well as my Google cloud console page. Just to clarify, as I press a button it does show me the google OAuth popup but after I select an account it throws the above error. ( Using Next 14 app router, appwrite v16.0.2)
Recommended threads
- The current user is not authorized to pe...
I want to create a document associated with user after log in with OAuth. The user were logged in, but Appwrite said user is unauthorized. User is logged in wi...
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- delete document problems
i don't know what's going on but i get an attribute "tournamentid" not found in the collection when i try to delet the document... but this is just the document...