oidc: Display error if applicable

This commit is contained in:
TwiN
2022-01-02 19:15:32 -05:00
parent 425c1d3674
commit 56048725e4
5 changed files with 11 additions and 4 deletions

View File

@ -124,7 +124,7 @@ func (c *OIDCConfig) callbackHandler(w http.ResponseWriter, r *http.Request) {
}
}
log.Printf("[security][callbackHandler] Subject %s is not in the list of allowed subjects", idToken.Subject)
http.Redirect(w, r, "/login?error=access_denied", http.StatusFound)
http.Redirect(w, r, "/?error=access_denied", http.StatusFound)
}
func (c *OIDCConfig) setSessionCookie(w http.ResponseWriter, idToken *oidc.IDToken) {