chore(auth): #331 add and fix session tests
This commit was merged in pull request #342.
This commit is contained in:
@@ -62,15 +62,6 @@ func CrossSiteRequestForgery(auth service.Auth) func(http.Handler) http.Handler
|
||||
}
|
||||
}
|
||||
|
||||
// Always sign in anonymous
|
||||
// This way, there is no way to forget creating a csrf token
|
||||
if session == nil {
|
||||
session, _ = auth.SignInAnonymous()
|
||||
|
||||
cookie := CreateSessionCookie(session.Id)
|
||||
http.SetCookie(w, &cookie)
|
||||
}
|
||||
|
||||
responseWriter := newCsrfResponseWriter(w, auth, session)
|
||||
next.ServeHTTP(responseWriter, r)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user