-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Back button during Facebook/Twitter flow shows 'Provider Error' #1572
Comments
@nole87 just to make sure I understand, is this the correct step sequence to reproduce?
|
when facebook or twitter is open and user can enter username and password than if user press back he get error message. Download from this link short clip: https://drive.google.com/file/d/1KGl0MnOW-M4HntMr9ZLi5n56bTkaGDLP/view?usp=sharing |
Thanks @nole87 that's a clear reproduction of the bug! |
Hey. There is someone working on this issue? If not, I'd like to give a try. Thanks. |
@ustrajunior I haven't had time to look at it yet, if you want to try please do! I'd be happy to review the PR |
Good afternoon! I am developing an application that starts with an activity for user authentication through email, Google, Facebook and Twitter, and I get the same error as @nole87 . Additionally, when the application is running, I get the following errors: Email / Google: NOTE: in the case of Google, the error appears three times. Facebook: NOTE: the error appears three times. Twitter: Second error: NOTE: the second error appears three times. Does the same behavior occur to you @nole87, @ustrajunior ? |
Hello, |
This week I will be working on this issue to try to find a solution. Hope to have something to the end of this week. |
@ustrajunior nice! Thanks for the update. |
@samtstern I believe I found the problem. For facebook callback, the onCancel method handles the cancel calling the onError method here: L112. I changed the onCancel method to this:
and I had to add SIGNIN_CANCELED to the ErrorCodes.java file. With this change, instead of "Provider error" it will show "The sign in process was canceled". The onError will continue to act the same way. For Twitter, it's a little different because there is no onCancel, just onFailure. I'm not sure, yet, if there is an easy way to differentiate an error of a cancel. For Google, not sure yet. I'm having problems to reproduce the error, for me, occurs an error but it is not shown on the UI. What do you think about this solution? If you think it's ok, I will continue following this path. |
Only facebook and twitter providers show toast msg when user cancel auth process. In my opinion best if possible no toast msg at all but if not possible or too much time it takes to resolve than some appropriate msg is good enough ... |
@ustrajunior that definitely seems like the right start to a solution! |
Going to move this to the next release milestone ( |
Thanks, @samtstern. Last week was crazy for me so I was not able to work on the issue. Til the end of this week, I hope to have a more concrete solution. |
@ustrajunior. Have you been able to come up with a solution now? |
I think I have come up with a solution. I attached a snippet for the Facebook callback in the
For Google sign-in you can check the status code in
The same idea can be applied to the other providers... |
Hey @KryptKode. Unfortunately, I did not have the time to work on this issue. You can get it if you want. |
Hi @samtstern I'm carrying on @ustrajunior 's work here since he just became a parent, yupi! :) We are currently doing a project at Universidade do Porto and this issue is part of an assignment of contributing to opensource. I believe @ustrajunior already solves the issue in the reply below, since #1627 removes TwitterSignInHandler and it doesn't make sense to temper with it for now. Also, just a tweek into his comment, since the toast message is an alert to the user, it makes more sense to display the message "The sign in process was canceled" to the user and to the developer show "The sign in process was canceled by the user". @KryptKode regarding the Google SignIn there is currently not issue with the back button, so don't think it's necessary. But your solution to the Facebook is nice and almost the same as @ustrajunior, but I think that since we already have a FirebaseUiException which is overloaded to support the exceptions message we should use it. I have submitted a pull request with the solution in #1630
|
@felipe-gouveia thanks for the PR and @ustrajunior congrats on becoming a parent! This week I am super busy with Google I/O so I will get to this as soon as I can. |
Thanks, @samtstern. Time is something rare, for me, right now ;D |
Facebook will be fixed in |
Hi @samtstern, @ustrajunior, and @felipe-gouveia, I still get the error in 5.0.0. Is there something I am doing wrong or is it yet to be fixed? Thanks for the good work. |
The fix for this issue has been released in version |
Step 1: Are you in the right place?
I think I am :)
Step 2: Describe your environment
All android devices
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
Step 3: Describe the problem:
When user try to sing in via firebase auth UI, and when user click on facebook or twitter provider and if he press android back he get toast message "Provider error". If he continue to singin via facebook or twitter it works but if user press bach he get error message. All is configured.
Steps to reproduce:
download test project from this link and try it: https://drive.google.com/file/d/1viGBLvyoMf5Tyedffuo0ZY8sMBPn6UqK/view?usp=sharing
For facebook provider all is configured, for twitter in this test project it isn't and you don't get for twitter provider toast error, only for facebook ...
Observed Results:
User see wrong toast error message
Expected Results:
there should not be any toast message when user goes back to previous screen
The text was updated successfully, but these errors were encountered: