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

Delay in signup time #121

Closed bcole2433 closed 4 years ago

bcole2433 commented 4 years ago

Describe the bug There is a long delay between when a user logs in through the FirebaseUI and when the user is redirected after signing (consistently 3 - 8 seconds). If a user refreshes or clicks to another page, the user is signed in through Firebase, but not through Wordpress. This means that the user is logged in on Firebase, but not on Wordpress which causes issues.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://premierlacrosseleague.com/login
  2. Login
  3. Click to another page right after submitting login page
  4. Refresh

Expected behavior If logged in correctly, the user should be redirected. If they go back to the /login page. There should be a Signout button with text indicating that you are already logged in.

Version The version of the plugin. E.g PRO v1.16

dalenguyen commented 4 years ago

Thank @bcole2433, It's because it needs to wait for firebase to log in successfully then log in to WordPress. Maybe a loading state can solve the click away behavior. I will take a look at the weekend.

In the email, it seems that you don't need to let users log in to WordPress. The v1.16.0 allows to updated User to Firestore. You can turn off the workaround if you want.

In order to let users know if they are logging in or not, you can use the greetings shortcode or a message only for logged in users.

dalenguyen commented 4 years ago

The loading state is added in v1.17.0