How to implement OAuth in Ionic?

I want to implement an Ionic App with OAuth. It’s not one of these special cases like Google, Facebook or using Firebase, but really plain old OAuth with an InAppBrowser where I log in to some service.

What are the best tutorials out there?
How can I best test this in a normal browser?

1 Like

Same challenge for me right now… take a look at this library what seems to work both in browser and in app:

It should be as easy as writing your own provider

I also found this step by step tutorial http://appseed.io/node/69

For now I hacked it together using code from this article:


This uses the Cordova InAppBrowser plugin directly and also doesn’t work in the browser though.

The https://github.com/nraboy/ng2-cordova-oauth/ you mentioned seems to be a evolution of “my” article. The article you linked has terrible code formatting, but seems to be easy enough to follow.

Has nobody else implemented OAuth properly in Ionic?

1 Like

Did you figure this out? In particular with firebase authentication as the destination?