Improved authentication

This commit is contained in:
2019-11-17 16:48:27 +09:00
parent f981be2b7d
commit ad9870b1c1
6 changed files with 38 additions and 34 deletions

25
auth/Install.go Normal file
View File

@ -0,0 +1,25 @@
package auth
import (
"os"
"github.com/aerogo/aero"
"github.com/aerogo/log"
)
const newUserStartRoute = "/welcome"
// Install installs all authentication routes in the application.
func Install(app *aero.Application) {
authLog := log.New()
authLog.AddWriter(os.Stdout)
authLog.AddWriter(log.File("logs/auth.log"))
// Login
Google(app, authLog)
Facebook(app, authLog)
Twitter(app, authLog)
// Logout
Logout(app, authLog)
}