Skip to content

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

@noob8boi

Description

@noob8boi

👟 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproduct / authFixes and upgrades for the Appwrite Auth / Users / Teams services.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions