Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing baseUrl when constructing callback signin url #9056

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

juanrgon
Copy link
Contributor

@juanrgon juanrgon commented Nov 4, 2023

NOTE:

  • It's a good idea to open an issue first to discuss potential changes.
  • Please make sure that you are NOT opening a PR to fix a potential security vulnerability. Instead, please follow the Security guidelines to disclose the issue to us confidentially.

☕️ Reasoning

Fixing a bug with the signIn callback when logging in with credentials with redirect: false and returning a url in the response. Currently returning an error about the url failing to be constructed.

Screenshot 2023-11-04 at 11 22 18 AM

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

📌 Resources

@juanrgon juanrgon requested a review from ThangHuuVu as a code owner November 4, 2023 16:55
Copy link

vercel bot commented Nov 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 4, 2023 4:57pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Nov 4, 2023 4:57pm

Copy link

vercel bot commented Nov 4, 2023

@juanrgon is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

@manuganji
Copy link

I'm still seeing this TypeError.

TypeError: Failed to construct 'URL': Invalid base URL

When I debug this is what I see for values for this inputs.

baseUrl: /api/auth
data.url: http://localhost:3000/sign-in

The correct way to invoke is

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

Successfully merging this pull request may close these issues.

3 participants