Skip to content

Can't log out deleted user with supabase.auth.signOut() #358

Closed
@heikowitte

Description

@heikowitte

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

If a user deletes their acccount using the swift client library, and supabase.auth.signOut() is called right after delete the account, the signOut will fail and the local cookie wont be deleted.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a cloud function that deletes a user
  2. Call this function via rpc on the swift client
  3. Call singOut on the swift client

Expected behavior

Session should be cleared and user logged out

Observed behavior

The sign out call fails due to a 403 error, the session is not cleared and the user still appears to be logged in.

Related Issues

This has been reported and fixed in the javascript sdk already (by ignoring the 403 error in the signOut function and clearing the session cache):

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions