mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +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:
|
// Check if user meets role criteria:
|
||||||
// Your custom logic here: to decide what roles and other `x-hasura-*` should the user get
|
// Your custom logic here: to decide what roles and other `x-hasura-*` should the user get
|
||||||
let customClaims;
|
let customClaims;
|
||||||
if (user.email && user.email.indexOf('@hasura.io') != -1) {
|
if (user.email && user.email.indexOf('@hasura.io') !== -1) {
|
||||||
customClaims = {
|
customClaims = {
|
||||||
'https://hasura.io/jwt/claims': {
|
'https://hasura.io/jwt/claims': {
|
||||||
'x-hasura-default-role': 'admin',
|
'x-hasura-default-role': 'admin',
|
||||||
|
Loading…
Reference in New Issue
Block a user