Upgraded to latest aero version

This commit is contained in:
2019-05-16 19:15:37 +09:00
parent 71361c9a97
commit c65ac1637d
4 changed files with 19 additions and 12 deletions

View File

@ -27,7 +27,7 @@ func Install(app *aero.Application) {
authLog.Info("%s logged out | %s | %s | %s | %s", user.Nick, user.ID, ctx.RealIP(), user.Email, user.RealName())
}
ctx.Session().Set("userId", nil)
ctx.Session().Delete("userId")
}
return ctx.Redirect("/")

View File

@ -69,6 +69,7 @@ func InstallTwitterAuth(app *aero.Application) {
// Get back the request token to get the access token
tempCred, _ := session.Get("tempCred").(*oauth.Credentials)
session.Delete("tempCred")
if tempCred == nil || tempCred.Token != ctx.Query("oauth_token") {
return ctx.Error(http.StatusBadRequest, "Unknown OAuth request token", nil)