19 lines
298 B
Go
Raw Normal View History

2017-06-16 23:32:47 +00:00
package auth
2017-06-11 09:13:59 +00:00
import "github.com/aerogo/aero"
2017-06-16 23:32:47 +00:00
// Install ...
func Install(app *aero.Application) {
2017-06-15 17:56:09 +00:00
// Google
2017-06-16 23:32:47 +00:00
InstallGoogleAuth(app)
2017-06-11 09:13:59 +00:00
2017-06-15 19:59:14 +00:00
// Logout
app.Get("/logout", func(ctx *aero.Context) string {
2017-06-17 20:19:26 +00:00
if ctx.HasSession() {
ctx.Session().Set("userId", nil)
}
2017-06-15 19:59:14 +00:00
return ctx.Redirect("/")
})
2017-06-11 09:13:59 +00:00
}