I don't understand why my node server, authenticated with authWithCustomToken(secret,funct()) seems to not get the admin privilege :
myFirebaseRef = new Firebase(url);
myFirebaseRef.authWithCustomToken(secret,function(error, authData) {
if (error) {
console.log(currTime() + " [CONFIG] ... Firebase authentication failed!", error);
} else {
console.log(currTime() + " [CONFIG] ... Firebase authentication succeeded, authData : " + JSON.stringify(authData));
}
}
Authentication seems successfull :
07:13 [CONFIG] ... Firebase authentication succeeded, authData : {"auth":null,"expires":null,"token":"","uid":null,"provider":"custom"}
When my server tries to update a child :
FIREBASE WARNING: update at /bd/google:112747494449447764778/9782871294917 failed: permission_denied
My client-side code is authenticated correctly and get the expected permissions.
My rules :
{
"rules": {
".read": true,
"bd": {
".read": true,
"$usernode": {
".read": true,
".write": "auth != null && auth.uid == $usernode"
}
}
}
}
Any hints ?