Skip to content

Allow sign out after deleting user #176

Closed
@fernland

Description

@fernland

Feature request

Is your feature request related to a problem? Please describe.

On my iOS app, I allow users to delete their own accounts (Apple requirement). Users are also able to delete their accounts from my website. After they delete their own account, which deletes the user from the auth users table, I want to sign them out. However, calling supabase.auth.signOut() leads to the error api(GoTrue.GoTrueError.APIError(message: nil, msg: Optional("User not found"), code: Optional(404), error: nil, errorDescription: nil)), so I'm unable to invalidate the current session on the app.

Describe the solution you'd like

Calling sign out if there is no user should also invalidate and remove the current session. It seems like this was fixed in https://github.com/orgs/supabase/discussions/9327 on the gotrue-js repo, wondering if the behavior can be the same on iOS.

Describe alternatives you've considered

N/A

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgotrueWork related to gotrue package

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions