dalenguyen / firebase-wordpress-plugin

A plugin that helps to integrate Firebase to WordPress
https://firebase-wordpress-docs.readthedocs.io
GNU General Public License v2.0
111 stars 31 forks source link

Dashboard/Frontend API Secret Token help needed #93

Closed kikaua closed 4 years ago

kikaua commented 4 years ago

Hello everyone. I have the Integrate Firebase PRO (v1.9.0) installed and configured correctly with Base Domain and Dashboard/Frontend API Secret Token. From WordPress/Firebase Database tab I can put in users and a UID and get returned results as expected.

From a WordPress page I can login with Firebase email and passwords, BUT with the following:

[firebase_login button_text='Signin' redirect='/firebase']

[firebase_greetings][/firebase_greetings]

[firebase_error class='your-class-name'][/firebase_error]

[realtime_col class='your-class-name' collection_name='users' display_fields='UserID,firstName,lastName,planType,langOne,langTwo,Credist']

[firebase_show class='your-class-name']This message is only for logged in users![/firebase_show] [firebase_logout][/firebase_logout]

I do see the greeting and the logout button, but I do NOT see the following to return:

[realtime_col class='your-class-name' collection_name='users' display_fields='UserID,firstName,lastName,planType,langOne,langTwo,Credist']

I see the note "Remember to set the security rule, so anyone can read your document.", but I am not clear if this is a Firebase rule and if it is can I get a sample of the allow rule to use?

Thanks in advance.

dalenguyen commented 4 years ago

Hi @kikaua, the rule should be appropriately set. It is for everyone if the collection is public or testing.

Is there any error or warning in the browser console log? And do you have a test link for this?

dalenguyen commented 4 years ago

Hi @kikaua, there is an error in the console log that may causes the issue.

image

Could you please sure the configuration on Firebase > General is exactly the same in your firebase project? Especially the database URL.

kikaua commented 4 years ago

That fixed it, but also very odd as i copied and pasted all the info, but somehow the url added the www. to the base url.

dalenguyen commented 4 years ago

Nice. I'm glad that it's fixed :D