feat: update user access (#151)

* feat: update user access

* revoked timestamp field updated

* updates

* updates

* updates
This commit is contained in:
Anik Ghosh
2022-03-24 14:13:55 +05:30
committed by GitHub
parent 1f3dec6ea6
commit b2541c8e9a
13 changed files with 477 additions and 7 deletions

View File

@@ -35,6 +35,10 @@ func LoginResolver(ctx context.Context, params model.LoginInput) (*model.AuthRes
return res, fmt.Errorf(`user with this email not found`)
}
if user.RevokedTimestamp != nil {
return res, fmt.Errorf(`user access has been revoked`)
}
if !strings.Contains(user.SignupMethods, constants.SignupMethodBasicAuth) {
return res, fmt.Errorf(`user has not signed up email & password`)
}