Open lesnitsky opened 2 years ago
Excited to see this getting close to fruition. Have an app that does not use passwords, and I need to create a web app, so this would be nice. I assume it means that dynamic_links is close to being available for web. How soon? Happy to help test or whatever.
I think the way this could be handled is via flutter's routing mechanism. This would only work on a hosted flutter web app.
Example scenario:
https://myawesome.web.app
https://myawesome.web.app/email-link-sign-in?<sign-in-link-payload-goes-here>
onGenerateRoute
(or routeInformationParser
and routerDelegate
for WidgetsApp.router
) that handles /email-link-sign-in
route, gets the payload and sends it down to the underlying firebase SDKAdding these to the flutterfire_ui directly would require less effort, rather than making dynamic_links
work on the web, but the latter is also doable (at least in my head)
I hope for web support.
By the way, to support web, two things are necessary: the redirect URL inside DynamicLink and the entered email address. The URL can be obtained with GoRouter or similar, and for retrieving the entered email address, I've added a callback to EmailLinkSignInScreen.
I consider this a temporary solution, so I haven't created a pull request for it, but please refer to it if you're looking for a simple implementation.
https://github.com/ywake/FirebaseUI-Flutter/tree/email-link-web diff
Any plans to expand email link sign-in to web (currently only iOS and Android)?
Originally posted by @wolframm in https://github.com/FirebaseExtended/flutterfire/discussions/6978#discussioncomment-1804939