Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Unable to pass shouldCreateUser: false when using generateLinkΒ #358

@chrisb2244

Description

@chrisb2244

Feature request

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

If I use the auth.signIn(...) function, I can prevent the creation of new users by passing shouldCreateUser: false.
It doesn't appear to be possible to do the same if instead I want to use auth.api.generateLink('magiclink', email, redirectTo).

Describe the solution you'd like

Addition of a parameter (probably in the options) for generateLink to allow the prevention of new user creation.

Describe alternatives you've considered

I can use the auth.signIn({email}, { shouldCreateUser: false, redirectTo, ...options }) function, but then I can't generate the email formatting as I might prefer.
Perhaps it's possible to workaround by first checking the existence of a user, and then rejecting before calling generateLink, but it would be nice to have the magiclink able to receive the same options as the signIn function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions