Simplified redirect statement in auth

This commit is contained in:
Eduard Urbach 2018-06-04 17:15:49 +09:00
parent 4d054d06a7
commit 75dd2a6990
2 changed files with 2 additions and 4 deletions

View File

@ -41,8 +41,7 @@ func InstallFacebookAuth(app *aero.Application) {
app.Get("/auth/facebook", func(ctx *aero.Context) string { app.Get("/auth/facebook", func(ctx *aero.Context) string {
state := ctx.Session().ID() state := ctx.Session().ID()
url := config.AuthCodeURL(state) url := config.AuthCodeURL(state)
ctx.Redirect(url) return ctx.Redirect(url)
return ""
}) })
// Auth Callback // Auth Callback

View File

@ -47,8 +47,7 @@ func InstallGoogleAuth(app *aero.Application) {
app.Get("/auth/google", func(ctx *aero.Context) string { app.Get("/auth/google", func(ctx *aero.Context) string {
state := ctx.Session().ID() state := ctx.Session().ID()
url := config.AuthCodeURL(state) url := config.AuthCodeURL(state)
ctx.Redirect(url) return ctx.Redirect(url)
return ""
}) })
// Auth Callback // Auth Callback