1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-26 09:09:36 -05:00

safe check

This commit is contained in:
Unknwon 2014-11-28 21:54:49 -05:00
parent db4951bc61
commit b6437b5a4c

View file

@ -51,6 +51,10 @@ func SocialSignIn(ctx *middleware.Context) {
ctx.Handle(500, fmt.Sprintf("UserInfo(%s)", name), err)
return
}
if len(ui.Identity) == 0 {
ctx.Handle(404, "no identity is presented", errors.New(name))
return
}
log.Info("social.SocialSignIn(social login): %s", ui)
oa, err := models.GetOauth2(ui.Identity)