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

fix: wrong redirect url for oidc requests #1909 #2149

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

Meierschlumpf
Copy link
Collaborator

This resolves the issue discussed in #1909

I replaced the NEXTAUTH_URL with AUTH_TRUST_HOST as the following piece of code only constructs the correct url when either VERCEL or AUTH_TRUST_HOST is set:

https://github.com/nextauthjs/next-auth/blob/494d16e54dd137d1b685a04f6aa8b5ba5e1121b0/packages/next-auth/src/utils/detect-origin.ts

Tested it on my site and also was validated by @rkj that it works for him

@Meierschlumpf Meierschlumpf added the 🐛 Bug Something isn't working label Oct 8, 2024
@Meierschlumpf Meierschlumpf self-assigned this Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 17.19% 5613 / 32638
🔵 Statements 17.19% 5613 / 32638
🔵 Functions 6.37% 33 / 518
🔵 Branches 37.32% 134 / 359
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/env.js 76.43% 0% 0% 76.43% 10-12, 57-68, 73-87, 92-102
src/server/auth.ts 20.71% 100% 0% 20.71% 27-139, 142-150, 158-169
Generated in workflow #6884 for commit 18cd99a by the Vitest Coverage Report Action

@manuel-rw
Copy link
Collaborator

Be sure to document this in the docs 1.0 PR :)

@Meierschlumpf
Copy link
Collaborator Author

Don't merge, the rabbit hole seems to continue

@Meierschlumpf Meierschlumpf merged commit 6469aa2 into dev Oct 16, 2024
4 of 5 checks passed
@Meierschlumpf Meierschlumpf deleted the fix-oidc-wrong-redirect branch October 16, 2024 14:47
Meierschlumpf added a commit that referenced this pull request Oct 18, 2024
* fix: app ping retry interval

* Bugfix for dynamic urls not properly replaces on Search (#2124)

* Bugfix for search items

* Fixing server side rendering issues

* Add rel="noreferrer" to link AppTile.tsx (#2126)

reference: 
Issue: #1933
PR comment: #2048 (comment)

* fix: Make timer button show only to admins (#2143)

* fix: wrong redirect url for oidc requests #1909 (#2149)

* fix: wrong redirect url for oidc requests #1909

* fix: login not working with https

* chore: New Crowdin updates (#2123)

* New translations health-monitoring.json (Greek)

* New translations login.json (French)

* New translations customize.json (French)

---------

Co-authored-by: Manuel <30572287+manuel-rw@users.noreply.github.com>
Co-authored-by: Jelte Lagendijk <j3lte@users.noreply.github.com>
Co-authored-by: Boyd <bebsworthy@gmail.com>
Co-authored-by: SeDemal <Tagaishi@hotmail.ch>
Co-authored-by: Thomas Camlong <thomas@ajnart.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants