it seems like a custom API public port is not considered properly for the redirect URL given to OAuth providers. Whenever I try to log in via SSO on my Netmaker dashboard deployed using Docker Compose, I get redirected to port 443 on https://api.NM_DOMAIN/api/oauth/callback.
Therefore, I started looking into the source code and found out that
Although I'm using v0.22.0, the bug doesn't seem to be fixed in v0.23.0 according to the source code, so I don't think upgrading would fix the problem.
Contact Details
No response
What happened?
Hi,
it seems like a custom API public port is not considered properly for the redirect URL given to OAuth providers. Whenever I try to log in via SSO on my Netmaker dashboard deployed using Docker Compose, I get redirected to port 443 on
https://api.NM_DOMAIN/api/oauth/callback
.Therefore, I started looking into the source code and found out that
https://github.com/gravitl/netmaker/blob/089df3d4cffe3723ed1563ba01da05eab5962d94/auth/auth.go#L84C2-L91C3
seems to be the issue, because
APIHost
shouldn't contain the public port. Currently, my setup looks like the following:I replaced Caddy with an nginx reverse proxy container for testing, but the issue was already occurring with Caddy.
docker-compose.yml:
netmaker.env:
Although I'm using v0.22.0, the bug doesn't seem to be fixed in v0.23.0 according to the source code, so I don't think upgrading would fix the problem.
Version
v0.22.0
What OS are you using?
No response
Relevant log output
No response
Contributing guidelines