Skip to content
Discussion options

You must be logged in to vote

I figured out how to use a custom redirect_uri on signin. The value isn't to be passed to the body, but rather appended as a query to the url.

  const doLogin = async () => {
    const { csrfToken }: { csrfToken: string } = await fetch(
      "http://localhost:3000/api/auth/csrf",
      {
        credentials: "include",
      }
    ).then((res) => res.json());

    const { url } = await fetch(
      `http://localhost:3000/api/auth/signin/twitter?${new URLSearchParams({
        redirect_uri: "http://localhost:3000/custom-callback",
      })}`,
      {
        method: "POST",
        headers: {
          "Content-Type": "application/x-www-form-urlencoded",
        },
        body: new URLSe…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@leo-petrucci
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by leo-petrucci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants