We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de114d6 + 6bce93a commit b6a087dCopy full SHA for b6a087d
example/server/server.go
@@ -86,7 +86,7 @@ func loginHandler(w http.ResponseWriter, r *http.Request) {
86
http.Error(w, err.Error(), http.StatusInternalServerError)
87
return
88
}
89
- us.Set("UserID", "000000")
+ us.Set("LoggedInUserID", "000000")
90
w.Header().Set("Location", "/auth")
91
w.WriteHeader(http.StatusFound)
92
@@ -100,7 +100,7 @@ func authHandler(w http.ResponseWriter, r *http.Request) {
100
101
102
103
- if us.Get("UserID") == nil {
+ if us.Get("LoggedInUserID") == nil {
104
w.Header().Set("Location", "/login")
105
106
@@ -113,6 +113,7 @@ func authHandler(w http.ResponseWriter, r *http.Request) {
113
w.Header().Set("Location", u.String())
114
115
us.Delete("Form")
116
+ us.Set("UserID", us.Get("LoggedInUserID"))
117
118
119
outputHTML(w, r, "static/auth.html")
0 commit comments