I have set my firebase database rules to "auth != null"
and to access the database through http request I can pass the auth Token with the api endpoint url like http.get('url?auth=<auth-token>')
. But I want to access the firebase database through firebase SDK.
firebase.database().ref('users'+ userId).on('value',(snapShot)=>{
this.setState({user: snapShot.val()});
})
Here I am not getting any response because my database rule is set to "auth != null"
. So how can I pass the auth detail in this request.