firebase / firebaseui-web

FirebaseUI is an open-source JavaScript library for Web that provides simple, customizable UI bindings on top of Firebase SDKs to eliminate boilerplate code and promote best practices.
https://firebase.google.com/
Apache License 2.0
4.58k stars 1.06k forks source link

Missing detailed documentation on widget modes #780

Open benomatis opened 3 years ago

benomatis commented 3 years ago

Maybe I'm doing something wrong, but I found very little information on widget modes except for a tiny portion of it in the docs here and what's in the code (below).

If I simply add one of the switch values taken from the code (eg. https://<url-of-the-widget>?mode=select as in the doc) to the URL where the UI form is being shown, nothing is changing at all, I'm still being presented with the login form (more exactly the email address field). So how do I use it?

https://github.com/firebase/firebaseui-web/blob/702e0122b848f2414fa75d2ad10871d0ec4cb323/javascript/widgets/dispatcher.js#L193-L292

benomatis commented 3 years ago

I found that some of it is document in the Firebase docs to Create custom email action handlers, and it gives an indication on the fact that the mode param value has to be used camelCased (ie. VERIFY_EMAIL becomes verifyEmail), but it only lists 3 out of the many available.

By the way, I tested it and it appeared to alter the message the UI returned based on the mode I used in the URL but only if I provided all the other parameters described in the above doc as well (I took a URL from an actual email verification email and altered the value of the mode param).

bojeil-google commented 3 years ago

Hey @benomatis, you are misreading the code. The email action mode parameters match with the publicly documented ones. You can see them here.

We have been wanting to provide feature parity with Android and iOS on the out of band email action handling (not yet supported there) and extend some of that functionality to support ActionCodeSettings. This is why we have not yet officially documented the additional email action modes.

benomatis commented 3 years ago

@bojeil-google not sure which part am I misreading, maybe I just missed the part about the casing, which the part of the code you linked clarifies, however the point of this issue is not about that, but the lack of documentation of mode options.

Where else are the email action modes documented other than in 'Create custom email action handlers' I linked above that only describes 3 of them?