W
W
WebDev2017-07-17 14:14:38
Apache Cordova
WebDev, 2017-07-17 14:14:38

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

1 answer(s)
D
Dmitry Entelis, 2017-07-17
@DmitriyEntelis

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 question

Ask a Question

731 491 924 answers to any question