mirror of
https://github.com/pomerium/pomerium.git
synced 2025-06-24 13:38:17 +02:00
authenticate: delay evaluation of OIDC provider (#1802)
* authenticate: delay evaluation of OIDC provider * add additional error message * address comments
This commit is contained in:
parent
a14b65ec3f
commit
5e3aa91f23
7 changed files with 176 additions and 54 deletions
|
@ -293,7 +293,12 @@ func (a *Authenticate) reauthenticateOrFail(w http.ResponseWriter, r *http.Reque
|
|||
enc := cryptutil.Encrypt(state.cookieCipher, []byte(redirectURL.String()), b)
|
||||
b = append(b, enc...)
|
||||
encodedState := base64.URLEncoding.EncodeToString(b)
|
||||
httputil.Redirect(w, r, a.provider.Load().GetSignInURL(encodedState), http.StatusFound)
|
||||
signinURL, err := a.provider.Load().GetSignInURL(encodedState)
|
||||
if err != nil {
|
||||
return httputil.NewError(http.StatusInternalServerError,
|
||||
fmt.Errorf("failed to get sign in url: %w", err))
|
||||
}
|
||||
httputil.Redirect(w, r, signinURL, http.StatusFound)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue