mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-02 00:10:45 +02:00
authenticate: clear session if ctx fails (#806)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
b88a619c0d
commit
eae217851a
1 changed files with 2 additions and 0 deletions
|
@ -221,10 +221,12 @@ func (a *Authenticate) SignIn(w http.ResponseWriter, r *http.Request) error {
|
|||
|
||||
s, err := a.getSessionFromCtx(ctx)
|
||||
if err != nil {
|
||||
a.sessionStore.ClearSession(w, r)
|
||||
return err
|
||||
}
|
||||
accessToken, err := a.getAccessToken(ctx, s)
|
||||
if err != nil {
|
||||
a.sessionStore.ClearSession(w, r)
|
||||
return err
|
||||
}
|
||||
// user impersonation
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue