Skip to content

Feature request: Sign up user without creating session #1063

Description

@maxfornacon

Is your feature request related to a problem? Please describe.
In my use case I want users to sign up, but not get signed in immediately. My application reacts on the AuthChangeEvent, but needs data from the DB that's not immediately present at the time when signUp is called.

Describe the solution you'd like
A possible solution could be adding a createSession parameter. Devs could decide if a session will be created after sign up.

await Supabase.instance.client.auth.signUp(
        password: password,
        email: email,
        createSession: false
    );

Because login credentials are still present I could just call signInWithPassword() after all processing is done to get the session.

Describe alternatives you've considered
Another solution for my user case would be passing a UUID to the signUp method so that I could prefill my user table with all necessary data and then call signUp but assign a self chosen ID to the AuthUser.

I could also create a user with an edge function, but that seems to be unnecessary overhead.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    authThis issue or pull request is related to authenticationblockedThis issue is blocked by another issueenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions