Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: OAuth Login Fails if Browser Session Already Exists for Another User #7021

Open
2 tasks done
noob8boi opened this issue Oct 27, 2023 · 3 comments
Open
2 tasks done
Labels
bug Something isn't working product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.

Comments

@noob8boi
Copy link

noob8boi commented Oct 27, 2023

馃憻 Reproduction steps

  1. Create an App with OAuth Logic.
  2. Create two users, User A and User B, with different identities.
  3. Log in with User A and delete the app, which leaves the browser session active.
  4. Attempt to log in with User B. This will fail due to the active User A browser session.
  5. You won't be able to log in with any user other than User A until the active session for User A is cleared.

馃憤 Expected behavior

There is nothing wrong with actual behavior, but I believe additional steps are necessary; otherwise, it may become challenging for the user to log back in. There are two potential solutions:

  1. Upon reinstallation, programmatically enable the creation of a new in-app session for an existing browser session, if possible.

  2. Provide a method for detecting the currently active browser session because there is no other way for the user to log in with an identity linked to a different user. Please note that account.deleteSession(sessionId: 'current') and account.deleteSessions() result in an error.

馃憥 Actual Behavior

Error user_already_exists with code 409.

馃幉 Appwrite version

Version 1.4.x

馃捇 Operating system

Linux

馃П Your Environment

Appwrite Instance - 1.4.3
Appwrite Flutter SDK - 11.0.0

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@noob8boi noob8boi added the bug Something isn't working label Oct 27, 2023
@akash19coder
Copy link

Maintainer could you please assign the issue to me? I would like to work on it.

@noob8boi
Copy link
Author

馃憻 Reproduction steps

  1. Create an App with OAuth Logic.
  2. Create two users, User A and User B, with different identities.
  3. Log in with User A and delete the app, which leaves the browser session active.
  4. Attempt to log in with User B. This will fail due to the active User A browser session.
  5. You won't be able to log in with any user other than User A until the active session for User A is cleared.

馃憤 Expected behavior

There is nothing wrong with actual behavior, but I believe additional steps are necessary; otherwise, it may become challenging for the user to log back in. There are two potential solutions:

  1. Upon reinstallation, programmatically enable the creation of a new in-app session for an existing browser session, if possible.
  2. Provide a method for detecting the currently active browser session because there is no other way for the user to log in with an identity linked to a different user. Please note that account.deleteSession(sessionId: 'current') and account.deleteSessions() result in an error.

馃憥 Actual Behavior

Error user_already_exists with code 409.

馃幉 Appwrite version

Version 1.4.x

馃捇 Operating system

Linux

馃П Your Environment

Appwrite Instance - 1.4.3 Appwrite Flutter SDK - 11.0.0

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

This issue will occur on clearing app data as well.

@stnguyen90 stnguyen90 added the product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. label Nov 7, 2023
@nick2432
Copy link

can i work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
None yet
Development

No branches or pull requests

4 participants