Login using Webservice


#1

How can we submit user credentials to a back-end web service for validation in a secured way?


#2

Hi @adgetz,

I know of two options:

  1. Get an SSL certificate and make sure $http.post communications are using https in the endpoint
  2. Implement Oauth so your app loads a remote login prompt via the web browser and returns a token for future API use

I’m sure there are other ways, but those are just two.

Regards,


#3

Hi @nicraboy
Thanks for your quick response. I think I can go with 2 for time being.


#4

Actually this is a more angular question than ionic and I’m sure you will find a lot of useful resources regarding token-based authorization in angular. Here is the one will get you started.


#5

I´m using firebase for this. See this helpful tutorial
Chapter “Authenticating users with a service”