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
- Error With iOS Apps
I keep getting the below errors for my flutter app. The clients are registered and have been. This wasn't an issue a few hours ago. AppwriteException: AppwriteE...
- Backup policies think im on free tier
Cant create more than one policy as im told to ugprade, when clicking upgrade im taken to the upgrade page which confirms im already on pro
- Cant get rid of "get started"
Not that important, but annoying. No matter what I do I cant get the "Get started" to go away, ive added a bunch of web platforms and its just stuck.