Skip to content

Commit

Permalink
relax SameSite requirement on members.dxesf.org "state" cookie
Browse files Browse the repository at this point in the history
This cookie needs to be accessible when redirecting from the Google
OAuth page, so it can't be strict.

While here, also bump up the cookies to "HttpOnly".
  • Loading branch information
mdempsky committed Feb 20, 2020
1 parent ed3b5cf commit a8c01f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion members/auth.go
Expand Up @@ -75,7 +75,8 @@ func (s *server) login() {
Name: membersState,
Value: state,
MaxAge: 3600,
SameSite: http.SameSiteStrictMode,
SameSite: http.SameSiteLaxMode,
HttpOnly: true,
})

var opts []oauth2.AuthCodeOption
Expand Down Expand Up @@ -114,6 +115,7 @@ func (s *server) auth() {
Value: idToken,
MaxAge: 3600,
SameSite: http.SameSiteStrictMode,
HttpOnly: true,
})
s.redirect(absURL("/"))
}
Expand Down

0 comments on commit a8c01f9

Please sign in to comment.