mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
community(sample-apps): update firebase-jwt functions (#4057)
This commit is contained in:
parent
58ba01f31c
commit
89aaf1a750
@ -8,7 +8,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('@hasura.io') != -1) {
|
||||
if (user.email && user.email.indexOf('@hasura.io') !== -1) {
|
||||
customClaims = {
|
||||
'https://hasura.io/jwt/claims': {
|
||||
'x-hasura-default-role': 'admin',
|
||||
|
Loading…
Reference in New Issue
Block a user