Rename hostname to base-url for accuracy
This commit is contained in:
@ -49,7 +49,7 @@ func Setup() (*Config, error) {
|
||||
oauthConfig := &oauth2.Config{
|
||||
ClientID: viper.GetString("oidc-sp-client-id"),
|
||||
ClientSecret: viper.GetString("oidc-sp-client-secret"),
|
||||
RedirectURL: viper.GetString("hostname") + "/callback",
|
||||
RedirectURL: viper.GetString("base-url") + "/callback",
|
||||
Endpoint: provider.Endpoint(),
|
||||
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
|
||||
}
|
||||
@ -250,7 +250,7 @@ func (c *Config) LogoutHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Add query parameters
|
||||
q := keycloakLogoutURL.Query()
|
||||
// Use logout-callback for completing the logout flow
|
||||
q.Set("post_logout_redirect_uri", viper.GetString("hostname")+"/logout-callback")
|
||||
q.Set("post_logout_redirect_uri", viper.GetString("base-url")+"/logout-callback")
|
||||
q.Set("client_id", viper.GetString("oidc-sp-client-id"))
|
||||
q.Set("state", state)
|
||||
|
||||
@ -342,7 +342,7 @@ func (c *Config) RegistrationHandler(w http.ResponseWriter, r *http.Request) {
|
||||
q.Set("client_id", viper.GetString("oidc-sp-client-id"))
|
||||
q.Set("response_type", "code")
|
||||
q.Set("scope", "openid email profile")
|
||||
q.Set("redirect_uri", viper.GetString("hostname")+"/callback")
|
||||
q.Set("redirect_uri", viper.GetString("base-url")+"/callback")
|
||||
q.Set("state", state)
|
||||
q.Set("nonce", nonce)
|
||||
q.Set("code_challenge", codeChallenge)
|
||||
|
Reference in New Issue
Block a user