Simplified redirect statement in auth
This commit is contained in:
parent
4d054d06a7
commit
75dd2a6990
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user