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

OAuth2CallbackPath using https when no TLS is defined #2898

Closed
n10000k opened this issue Feb 1, 2024 · 3 comments
Closed

OAuth2CallbackPath using https when no TLS is defined #2898

n10000k opened this issue Feb 1, 2024 · 3 comments

Comments

@n10000k
Copy link

n10000k commented Feb 1, 2024

Describe the bug
When running locally and using OAuth2CallbackPath - /callback It will pass https:// protocol in the url callback when the server TLS settings are not found and defaults to http.

Logs for TLS:

{"level":"info","msg":"TLS settings not found, defaulting to HTTP","time":"2024-02-01T00:00:00Z"}

Route:

callback: Path("/callback")
    -> grantCallback()
    -> <shunt>;

To Reproduce
Run from localhost with no TLS config, add the callback uri, set your oauth2 provider callback to be http://localhost/callback

Expected behavior
Not to pass https:// and use http:// when no TLS config defined

Observed behavior
https://localhost/callback is being passed, which doesn't match the redirect uri on the oauth2 provider.

@AlexanderYastrebov
Copy link
Member

Hello, please check whether -oauth2-grant-insecure flag introduced by #2457 solves your problem.

@n10000k
Copy link
Author

n10000k commented Feb 1, 2024

Hello, please check whether -oauth2-grant-insecure flag introduced by #2457 solves your problem.

Great this works, thanks. Couldn't see this in the docs?

@n10000k n10000k closed this as completed Feb 1, 2024
AlexanderYastrebov added a commit that referenced this issue Feb 1, 2024
Followup on #2203
Followup on #2244
Followup on #2457

Updates #2898

Signed-off-by: Alexander Yastrebov <[email protected]>
@AlexanderYastrebov
Copy link
Member

Great this works, thanks. Couldn't see this in the docs?

Created #2899

AlexanderYastrebov added a commit that referenced this issue Feb 5, 2024
Followup on #2203
Followup on #2244
Followup on #2457

Updates #2898

Signed-off-by: Alexander Yastrebov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants