react-admin-firebase icon indicating copy to clipboard operation
react-admin-firebase copied to clipboard

Extend supported Firebase Authentication

Open LaszloDev opened this issue 5 years ago • 1 comments

This is a concept for extending and providing support for multiple Firebase authentication modes.

Default will still be firebase.auth.signInWithEmailAndPassword(), but this PR opens the possibility to write your own LoginPage-component which can pass a mode to the React-Admin LOGIN-action. Based on this mode different Firebase authentications will be possible.

In the first stepp I implement the mode link, which refers to Firebase "Email Link" authentication method. (Find out more here https://firebase.google.com/docs/auth/web/email-link-auth)

Open tasks / Bugs:

  • [ ] Auth method "link": Provide option to configure actionCodeSettings-object
  • [ ] Auth method "link": Display different text on the "login"-button based on link request or actual login
  • [ ] Auth method "link": Show notification when success requested an email login
  • [ ] Auth method "link": Prevent reload when requesting the login email
  • [ ] Implement more authentication methods

Related Issues:

  • https://github.com/benwinding/react-admin-firebase/issues/34

Let me know if you see issues or alternative ways to implement this extension.

LaszloDev avatar Sep 09 '19 12:09 LaszloDev

Hey @LaszloDev,

Looks like a great start, I like the way you've implemented the mode option to determine the auth strategy to use in the app. The only thing I would only suggest looking at this project:

https://github.com/firebase/firebaseui-web

It's a popular way to implement different authentication methods with the Firebase sdk and might make things a bit easier (but I'm not sure). Thanks again.

Cheers, Ben

benwinding avatar Sep 12 '19 08:09 benwinding