Firebase : User authenticated and FirebaseDB.GetValue

Hi

In my app, I'm using my own Firebase Realtime database with email/password authentication.

With the following rules evrything works fine:
{
"rules": {
".read": true,
".write": true,
}
}

For security issue, I would like to change these rules by:
{
"rules": {
".read": "auth != null",
".write": "auth != null",
}
}

In the 2nd configuration of rules, when I use the FirebaseDB.GetValue function, I've a Firebase error "Permission denied".

In the app, the first step is to authenticate the user by using a WebViewer and a .js script (with signInWithEmailAndPassword function).

How the authenticated user in the .js can be managed in the app, (ie. how can the FirebaseDB.GetValue can be used and keep this autenticated status) ?

Regards

You either have to stay in the WebViewer and run all your commands using html/js, or capture the userToken on authentication, which you can then use with the web component. You can pass data backwards and forwards from the app to the webviewer using the webviewstring.

See here

Firebase with a Web Component

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.