Answer the question
In order to leave comments, you need to log in
How to do authorization in mobile applications?
I'm making a mobile app for a website using cordova. Reached authorization. On the site, authorization is usual through cookies, but in mobile applications, as far as I know, they often (always?) do authorization through a token in the headers.
What is the advantage of such an approach? Is it possible to use authorization on cookies? What is the difference?
Answer the question
In order to leave comments, you need to log in
Technically, a cookie is a header like "Cookie: mycookie=12345".
So it's a matter of taste, there are no special advantages.
The only thing I can assume is that if the API passes some data in cookies (this is very, very bad design) - then it might be convenient to separate the authorization from the data.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question