community(sample-apps): update firebase-jwt functions (#4057)

This commit is contained in:
Ahmet Simsek 2020-04-01 04:15:23 +03:00 committed by GitHub
parent 58ba01f31c
commit 89aaf1a750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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',