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
110 stars 31 forks source link

Authenticating as Firebase user creates WP user but has no permissions on WP site #126

Closed BetterAutomations closed 3 years ago

BetterAutomations commented 3 years ago

Describe the bug I have the following settings in auth. When I login as a Google user, it creates the WP user but that user has no permissions to use the site. I have even changed that user to Administrator, tried two different browsers, removed/reinstalled the plugin, and cleared the cache and cookies. Please assist.

WP Firebase auth settings: https://i.imgur.com/fMeIQ06.png

WP Firebase general settings: https://i.imgur.com/cp0QFz8.png

Google Firebase settings: https://i.imgur.com/K6P9MJE.png

User in WP: https://i.imgur.com/VQeGLxC.png

User has no access to user content on WP. Cannot see links at top: https://i.imgur.com/XlstiHv.png

Original WP-only admin can see links at top: https://i.imgur.com/IToLmwU.png

To Reproduce Steps to reproduce the behavior:

  1. Add settings as above
  2. Add a page to WordPress that only Administrators users may view
  3. Login as new Google user
  4. Assign Administrator to that user
  5. Log out and back in again as the new user
  6. Attempt to view the hidden page

Expected behavior Firebase users should be treated the same as full WP users

Screenshots The version of the plugin. PRO 1.19.0

Screenshots See above

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

dalenguyen commented 3 years ago

Hi @BetterAutomations, when a user logs in via Google, will they get the role as Subscriber or 'Customer'? Or do you have any other plugin that assigns different user roles?

If you have a test site, please send it to me via email, I can help to test it.

BetterAutomations commented 3 years ago

By default they get role of Customer. WooCommerce would assign Customer or if a subscription is purchased, would assign the role Subscriber. But that didn't even create any Firesbase username. Going through WCommerce only creates a WP username with Customer or Subscriber.

I will email the details.

dalenguyen commented 3 years ago

This is fixed in v1.20.0

BetterAutomations commented 3 years ago

Dale, I am seeing this again on versions 2.4.0 and 2.3.0. Please advise.