-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signed in user can not confirm their account #98
Comments
Thanks a lot for the detailed description @mariha, while I can't immediately reproduce the issue, we've had reports like this in the past. We need to look at state transitions between signed in/verified/signed out more clearly and especially at how they tie into routing. My hope is that in the refactor we're doing soon, this problem will fix itself, especially since we'll be more explicit about which states the application can be in. Keeping this open for now and will revisit after the state refactor! |
Email verification issues have been plaguing us since at least this issue was filed. I took a deep look at it during the last days. Scenario 1It's possible that some changes in 2021 have resolved scenario 1. I haven't tested it specifically with the Facebook iPhone app in-app browser, but in scenarios that I've tested over the last months, this hasn't happened, nor did we get more issue reports about this.
Scenario 2We got many reports about this scenario. I have been able to reproduce a version of this scenario locally, and I fixed that version in this commit: d3d5305 - I hope this fixes all verification issues we've had, and I will close this issue until we see another related issue report. Here is some explanation of what I changed:
For many people the verification flow worked (and Michiel wasn't able to reproduce the issue above). The onAuthStateChanged => onIdTokenChanged There was one catch: if you created an account in tab A, and then clicked the email verification link which opens a new wtmg app instance in tab B, then the app in tab A would have been left with an outdated state, until you refreshed the page or logged out/logged in. This is because email verifications don't trigger Now we listen to Improved speed & reliability
Now we check for which exact state we are in on every auth state change (login, logout, token change, ...), and we try to take the necessary actions from that state, without depending on the one-off successful execution of the Additionally, I removed several redundant Other bugs resolvedThere were several other bugs that had been affecting us when testing locally (for example, we could never create or update gardens in environments with an app running locally). These bugs were related to verification too: if d3d5305#diff-135da8b11c910e156d8b780cf4bed7e145c8fbfef8f225437e400e3a5a6ede1eR70-R83 It's possible for Firebase to tell you that The changes above now force refresh the token whenever we notice that we are in an inconsistent state, fixing these issues. More optimizations are possible (server-side verification would be nice!), but this hopefully is already a big improvement. |
These are possibly two related issues or one.
Scenario 1.
I created an account from Facebook iPhone app (link from a comment). Something went wrong during the registration, I got an error.
Then I opened WTMG site in Chrome, tried to register but got a message the email is already in use - means the account was created.
Went to login and could login without issues but:
Scenario 2.
https://welcometomygarden.org/account?confirmed=true
was waiting for a response.The text was updated successfully, but these errors were encountered: