M
M
MaxEpt2015-11-22 13:54:16
PHP
MaxEpt, 2015-11-22 13:54:16

How to do authorization in the IOS application that interacts with the site?

Good afternoon! There is such a site - beauty-exchange.ru
I developed the site myself, now I am making an ios application for it. The application can also receive a filtered list of users, chat. For chat I will use node.js and sockets.
A question now in the correct authorization of users. Checking the user's password either on the client or on the server is not a problem. How to build further interaction with api ? So that the server knows for sure that, for example, an authorized user sent a chat message from his iphone, and not Vasya, who just knows the back-end url? What algorithm?
So far I have only reached oauth. If you understand correctly, you need to raise oauth on the server with the site and work through it. Is this true? And if so, where can I see examples?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
Dmitry Donkovtsev, 2015-11-22
@Demetriy

1) When authorizing (sending a password and login) from the ios application, you return the token to the application.
2) You send the token every time with every request to the site in the request headers (headers).

P
Petrushka, 2015-11-22
@petruska

through the REST api
you just throw fields on the server

M
MaxEpt, 2015-11-22
@MaxEpt

https://scotch.io/tutorials/authenticate-a-node-js... here's what I googled. I think it's the most appropriate solution. who will say what?

V
v- death, 2015-11-22
@vGrabko99

json WEB token (given by the server) + sqlite (storage of the token by the person)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question