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

Calling oauth url with http results in an error #12194

Open
anton-mauritzson opened this issue Nov 7, 2024 · 3 comments
Open

Calling oauth url with http results in an error #12194

anton-mauritzson opened this issue Nov 7, 2024 · 3 comments
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.

Comments

@anton-mauritzson
Copy link

anton-mauritzson commented Nov 7, 2024

Environment

System:
OS: macOS 14.2.1
CPU: (10) x64 Apple M1 Max
Memory: 810.92 MB / 64.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
Yarn: 1.22.17 - /usr/local/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
Browsers:
Chrome: 130.0.6723.116
Safari: 17.2.1
Safari Technology Preview: 14.0.1
npmPackages:
next: 15.0.1 => 15.0.1
next-auth: ^5.0.0-beta.19 => 5.0.0-beta.25
react: 19.0.0-rc-69d4b800-20241021 => 19.0.0-rc-69d4b800-20241021

Reproduction URL

https://github.com/panva/oauth4webapi

Describe the issue

after upgrading to next 15 and thus upgrading next-auth to beta-25 it seems that next-auth has upgraded its dependency of https://github.com/panva/oauth4webapi to 3.0 that included breaking changes to not allow by default requests from the module to insecure addresses. panva/oauth4webapi@4829da6

This commit seem to have something missing 0244513 i'm unable to trace why but we're getting an error from next-auth
image

We are running an oAuth server in a kubernetes cluster and the service calling the oauth server is in the same cluster so https is not required for us.

How to reproduce

install next 15 and the latest next-auth 5.0.0-beta.25.
set up a custom provider with http protocol for the token request.

Expected behavior

looking at the code in the commit where oauth4webapi was upgraded, it seems that it should be allowed from this package.

@anton-mauritzson anton-mauritzson added bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime. labels Nov 7, 2024
@panva
Copy link
Contributor

panva commented Nov 7, 2024

You can see in the specific PR that bumped oauth4webapi that all http-triggering requests made are configured to allow http requests.

@anton-mauritzson
Copy link
Author

@panva yes i can see that, however that doesn't explain how oauth4webapi is throwing the error i'm getting. Because this error
image
is from oauth4webapi
image

@panva
Copy link
Contributor

panva commented Nov 7, 2024

Providing a source-map based stack trace would probably come a long way towards being able to identify the actual reason for this behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Projects
None yet
Development

No branches or pull requests

2 participants