Added status messages

This commit is contained in:
2017-07-12 20:37:34 +02:00
parent ab938e804c
commit 9d309b2e8c
9 changed files with 124 additions and 48 deletions

View File

@ -90,6 +90,10 @@ func InstallGoogleAuth(app *aero.Application) {
return ctx.Error(http.StatusBadRequest, "Failed parsing user data (JSON)", err)
}
if googleUser.Sub == "" {
return ctx.Error(http.StatusBadRequest, "Failed retrieving Google data", errors.New("Empty ID"))
}
// Change googlemail.com to gmail.com
googleUser.Email = strings.Replace(googleUser.Email, "googlemail.com", "gmail.com", 1)