firebase_phone_auth_handler
firebase_phone_auth_handler copied to clipboard
web compatibility
Hey , thanks alot for the package.
you have push the latest release for linking in the phone auth with current user details. so as far as I'm aware, this method is not working yet on web. have you yet been able to achieve this on web ??
Hey @mufarrah, I could not find any way to get the auth credential from the web sign-in handler, and that is needed for linking user's credential.
There are no official docs also that I could find for the same. If you have some docs referring to this issue, please share so I'll implement accordingly..
As of now, it works only on mobile devices and not on the web platform..
Hi @rithik-dev , I don't understand... Should this package work in a flutter web project or not? If not, what do you mean by "Supports OTP on web out of the box" in the readme?
Hi @rithik-dev , I don't understand... Should this package work in a flutter web project or not? If not, what do you mean by "Supports OTP on web out of the box" in the readme?
Is working on web as i tried it. but the problem is that when i already have users that are registered, and i tried to login using otp and multifactor, i could not link the logged in user with the user that was already registered in flutter web. i think that is the issue here
Yep, @mufarrah answers the issue correctly. I was not able to find a way to link to an existing user on web, as there is a different API when using phone authentication on web.
And btw, "supports web out of the box" implies exactly this that the widget internally handles the different logics for authentication on mobile and web, and none of it needs to be handled by you 😀
@esmlima
Thanks for your quick response @rithik-dev and @mufarrah . I'm still not able to make it work... In the project's example screens, you show an SMS with text that is very different from the default Firebase template. From everything I've read from the documentation, it's not possible to change the SMS text, how did you get that? Do you believe that the format of the message could be causing the package not to work for me?
Your SMS example:
My SMS (initially with portuguese Firebase template and later with english template - none have worked):
Hey @esmlima , that screenshot is quite old I am guessing, that is why the template seems different.
I've also tried to change the template and didn't find any way to change that...
I don't think the template plays any role in your code not working. I would say go through the README once again to see if you missed some configuration steps...
Hi @rithik-dev , thanks for your response. I've read and re-read your README several times. I've tested numerous approaches on 3 different projects and I can't get it to work. I'm able to send the messages and manually authenticate the user, but the autofill just doesn't work. I sent you an email and a Linkedin connection, would you consider an offer for freelance work?
There is an open issue regarding Firebase SMS template not working in web: https://github.com/firebase/firebaseui-web/issues/828
It does not comply with the web.dev standard for OTP: https://web.dev/web-otp/
I'm able to make autofill work in web using the standard SMS message template and their demo page: https://web-otp.glitch.me/
But if I change the template (even slightly) the autocomplete stops working. And the default Firebase SMS template simply doesn't comply to that standard.
Oh, so I think you can stick to the default template for now. This package is just a wrapper around the base firebase package, so, whenever that is fixed, so, this package will reflect the fixes.. (I keep updating the dependencies time to time)
Closing this because of no activity. Feel free to open a new issue if the issue still persists.