here you try to play a trick,
instead of getting get id token, use set global token to get tinydb get tag ( token) value (get token)
so nexttime while login it will try to use the same tokenâŠ
here you try to play a trick,
instead of getting get id token, use set global token to get tinydb get tag ( token) value (get token)
so nexttime while login it will try to use the same tokenâŠ
I guess itâs true. Iâm testing now /// I have tested. The only thing that has changed is that the articles did not rank higher.
why do you getting tag?? i told to get tinydb token value alone, there by next time while login , it will not over write the exisiting value, nor sure how for it will workâŠ
So every time login the id token value is changing⊠Why dont you use anyother method?
i mean, by using that extension, you use login via any email (but tell the use to use gmail only accepted)
once they sign in(save email, token), get uid token (it wont change just like firebase authendication i tested it). When they login success enable taifun gmail account picker(get it from community)
If the taifun gmail picker matches with email they used to sign mean, allow for the next stepâŠ
Actually, if you look at it, I logged in with google before. But when he showed me this method, I thought I should do something different.
All I was trying to do is I wanted my phone to recognize the user UID when it switches from screen1 to Screen2 and let me write to firebase.
Now, I guess I need to go back and set the email login, then teleport to Page 2, then it should recognize my UID and get permission to write to the page.
I really donât know this place, I canât. And thatâs what I always ask.
In your firebase rules you are setting it to allow reading in the tags that have the UID (the user identifier).
But in your firebase structure there is no UID. You must create a tag with the UID of each user and inside this tag each user will be allowed to write or read what you want.
As you can see in the image, you have a label called âusersâ and inside are the UIDs.
And in the rules the âusersâ tag is defined and then the âuidâ of each user.
{
ârulesâ: {
âusersâ: {
â$uidâ: {
â.readâ: â$uid === auth.uidâ,
â.writeâ:"$uid === auth.uid"
}
}
}
}
So what you have wrong is the structure of your firebase database, which does not match with the rules you have put in it
Of you check up with my earlier post, see, under user it is writing uid of every logged in devices and under each uid then i am saving their email . But in your case there is no such action is happening⊠Under user directly it is writing email??? See to that .
Do I need to collect all headers under users?
What I have to do in order.
1- Build a recording platform.
2- Save the user UID in firebase.
3- To the Rules section
{
âCharterâ: {
âusersâ: {
â$uidâ: {
â.readâ: â$uid === auth.uidâ,
â.writeâ:"$uid === auth.uid"
}
}
}
}
Write these rules.
4- Send registered user to page 2.
5-Registered users can now write and read the information on the 2nd page.
Now if I set the rules so that only registered users can write to âusersâ. they cannot write during registration and their UID is not saved.
Anyone can write the âusersâ rules I need to do. but only registered users can read it.
when i get past page 2
{
âCharterâ: {
âstainâ: {
â$uidâ: {
â.readâ: â$uid === auth.uidâ,
â.writeâ:"$uid === auth.uid"
}
}
}
}
If I write this in addition to the rules, only registered users will be able to read and write the âspotâ title.
I need to write separate maid for each title.
The âbildirimâ can be read by logged in people. should write the manager.
âspotâ can be read by logged in people. should write the manager.
âguncelâ logged in people can read it. should write the manager.
âUsersâ section. Everyone should be able to write and everyone should be able to read.
{
ârulesâ: {
âspotâ:{
â$user_idâ: {
â.readâ: â$user_id === auth.uidâ,
â.writeâ: â$user_id == âsqSbtXDltignIh0aIE1LsX1klxu1ââ
}
}
,âguncelâ:{
â$user_idâ: {
â.readâ: â$user_id === auth.uidâ,
â.writeâ: â$user_id == âsqSbtXDltignIh0aIE1LsX1klxu1ââ
}
}
,âbildirimâ:{
â$user_idâ: {
â.readâ: â$user_id === auth.uidâ,
â.writeâ: â$user_id == âsqSbtXDltignIh0aIE1LsX1klxu1ââ
,"users": {
".read": true,
".write": true
}
}
}
}
}
Since this method doesnât work, I delete them all and try new blocks.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.