🔧 Development
René René Jul 25, 2023

SSO with Firebase Auth

My app uses Firebase Authentication and I'd like to use the same login method for my Waterhole community. However:

  • I don’t see Firebase in the list of providers supported by Laravel Socialite, but I assume it's possible to set it up as a custom provider, right?
  • If we launch using Waterhole's user and password, is it possible to merge/migrate accounts to other auth provider later on?

Any pointers would be appreciated. Thanks!

⁨4⁩ ⁨Comments⁩

Toby Toby Waterhole Founder Jul 28, 2023

Hi @René, I've never used Firebase Authentication before but I just had a look into this. As far as I can tell, Firebase doesn't expose an OAuth server so it can't be used with Laravel Socialite.

For the next Waterhole release (0.4) I am planning a single sign-on (SSO) feature that should make this integration possible. I'd be happy to help you set this up if you're happy to beta-test it!

In the meantime, launching with Waterhole's default auth should be fine as the SSO system will allow you to match up accounts by their email.

In reply to Toby Toby

Thanks @Toby, sounds good! Happy to be beta testers and in the meantime we'll probably launch with Waterhole's default auth and sync emails with Firebase.

In reply to Toby Toby

Quick update — We're now considering using Waterhole's default auth as the main Login method for our web app too (blank.page). This way we have a single user database and avoid having to match accounts.

Is it possible to customize Waterhole's login/signup pages so they can be used as "generic" login modules? Similar to Google's sign-in that's used to access its different services.

Anyway, maybe this use-case can help shape the upcoming SSO feature...?

Toby Toby Waterhole Founder Aug 12, 2023
In reply to René René

Using Waterhole as an auth provider for external apps is not currently supported. I will keep this in mind when building the SSO feature – that could definitely be a useful addition.

The other way to do it would be to implement Laravel Passport to add an OAuth2 server to your Waterhole installation, and then authenticate external apps with that. But this would require a bit of custom dev work.