Added additional precuations for users that do not exist and verified auth access.
This commit is contained in:
@@ -7,7 +7,7 @@ exports.processSignUp = functions.auth.user().onCreate((user) => {
|
||||
// Check if user meets role criteria:
|
||||
// Your custom logic here: to decide what roles and other `x-hasura-*` should the user get
|
||||
let customClaims;
|
||||
if (user.email && user.email.indexOf("@thinkimex.com") !== -1) {
|
||||
if (user.email && user.email.indexOf("@admin.imex.online") !== -1) {
|
||||
customClaims = {
|
||||
"https://hasura.io/jwt/claims": {
|
||||
"x-hasura-default-role": "admin",
|
||||
|
||||
Reference in New Issue
Block a user