actually plumbed the oauth port through to the server

This commit is contained in:
Cam 2023-09-12 14:04:55 -05:00
parent dfaeba493f
commit 1345990ede
No known key found for this signature in database
GPG Key ID: 367B7C7EBD84A8BD
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ In your oauth provider of choice's setup you would be prompted to create a clien
The port you choose is entirely up to the deployment. Just make sure it is open to receive callbacks from your configured oauth providers.
redirect_url is what we will tell the oauth providers to callback with the authorization result. This will be whatever domain you've chosen to host the access point against.
redirect_url is what we will tell the oauth providers to callback with the authorization result. This will be whatever domain you've chosen to host the access server against. This will get combined with the above port.
We then secure the response data within a zrok-access cookie. This is secured with the hash_key_raw. This can be any raw string.

View File

@ -302,7 +302,7 @@ func configureOauthHandlers(ctx context.Context, cfg *Config, tls bool) error {
if err := configureGithubOauth(cfg.Oauth, tls); err != nil {
return err
}
zhttp.StartServer(ctx, "0.0.0.0:28080")
zhttp.StartServer(ctx, fmt.Sprintf("%s:%d", strings.Split(cfg.Address, ":")[0], cfg.Oauth.Port))
return nil
}