Next.js Discord

Discord Forum

Specifying callback URL when using email provider

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Spectacled bearOP
I'm using email provider with a custom email page... Now How can I define custom url?
without using signIn function.

12 Replies

Spectacled bearOP
Please help
Spectacled bearOP
Please help 2
If something it is not clear, Please tell me so I add additional information
Spectacled bearOP
Please help 3
Savannah
Are you referring to next auth email provider?
How else are you signing in
Spectacled bearOP
I have form which I submit it using post request to /api/auth/signin
@Spectacled bear I have form which I submit it using post request to /api/auth/signin
Savannah
why exactly are you doing it like that?
Savannah
(psuedo code) i think this works
          <button
            type="button"
            onClick={() =>
              signIn("email", {
                "your@email.com"
                callbackUrl: `https://youtcallback.com/page`,
              })
            }
          >
            Sign in with Email
          </button>
Don't over complicate things with post requests when the package does almost everything for you