custom OAuth provider?

465 views
Skip to first unread message

The Alchemist

unread,
Jan 19, 2018, 7:28:10 PM1/19/18
to Firebase Google Group
I was looking at https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/auth.js  and https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/idp.js and there doesn't seem to be an obvious way to create a new OAuth provider.

The OAuth provider I wanna use is very similar to Twitter, so I was hoping to just subclass the TwitterAuthProvider and override a URL, but that doesn't seem possible.  In fact, I can't find a reference to api.twitter.com anywhere in the code.  How does it even know what endpoint to hit?

If anyone could point me in the right direction, that would be awesome!

Bassam

unread,
Jan 22, 2018, 12:23:24 AM1/22/18
to Firebase Google Group
Hey Alchemist,
Currently the OAuth provider class only supports existing providers. We are looking into extending it for future providers.
For now, if there is a provider that we do not support, you can use custom Auth to sign in with that provider. Learn more on custom authentication:
Here is a great blog post on authenticating with Instagram using that technique:

Best regards,
Bassam
Reply all
Reply to author
Forward
0 new messages