🎨 登录重定向

This commit is contained in:
Liang Ding 2019-05-17 11:59:57 +08:00
parent 29d4d93019
commit 72e46e3e52
No known key found for this signature in database
GPG Key ID: 136F30F901A2231D
1 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,8 @@ func GithubCallbackHandler(w http.ResponseWriter, r *http.Request) {
httpSession.Values["id"] = strconv.Itoa(rand.Int())
httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
httpSession.Save(r, w)
http.Redirect(w, r, "/", http.StatusSeeOther)
}
// GitHubUserInfo returns GitHub user info specified by the given access token.