createOauth2Session gives error 409 Conflict if user already exists but logged out
- 1
- Accounts
- Web
- Cloud
No. Having the identity there with the user id matching is the expected
Does the user have any other sessions active?
Nope, no sessions
not after the deleteSession
step.
And the emails match up between the account and the identity?
Let's try this...take note of all the user identity details. Then, delete the user identity, sessions, and the user itself. Then, try to create an oauth2 session again. It should create another identity. Please compare the details between the new identity and the previous one. Do the details match?
i have the same issue. when i got this 409 error, i bypass like that.
WAY 1: 1-open your app 2- login with another user with email and password not oauth2 3- logout user (it clears all cookies and localstorage about user) 4- login with oauth2, it should work
WAY 2: if you delete directly exact session from appwrite console with related user, it should bypass this error message as well.
Problem: i guess browser saves some local storage and cookies, and appwrite has session with that logged in. While testing it you are trying to create session with oauth2 again and it conflicts with session that is already created. So, please clear all sessions and start to try again
Yup they do
I performed the steps as you mentioned, The identities of before and after differ by userId.
How about the provider uid?
They match
Okay so google is always returning the same provider user id...then Appwrite shouldn't be trying to create another user or identity π΅βπ«
Way 1 is out of scope for me, As I do not want emailSession I have been doing way 2, but still getting conflict.
But it should after the deletion of identity right ? It doesn't create another identity though if we call on it. I think
It's like after logout, appwrite just tries to create a user regardless of identity
After you deleted and signed in again, a new user and Identity were created. After that, it should lookup the previous user and Identity
It would only do that if it can't match on email/provider user id
Right, I feel however that condition is being disregarded. It is just going on to create a user.
So, again, you only have 1 identity in your project? How many users?
And if you call account.get() before the create oauth2 session, it throws an exception?
Many anonymous users, 4 identities, becuase I used Oauth with 4 different accounts
Can you delete all identities and users?
I do actually, I get the guest scope right after logout and before createOauthSession.
Ok doing it now, Is there a way to bulk delete from appwrite cli ?
Maybe some bash + jq magic
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Project in AppWrite Cloud doesn't allow ...
I have a collection where the data can't be opened. When I check the functions, there are three instances of a function still running that can't be deleted. The...