I
I
Ivan Lemeshev2015-03-24 07:13:26
JavaScript
Ivan Lemeshev, 2015-03-24 07:13:26

How to properly organize a session when authorizing on Backbone.js with a backend on Yii2?

Hello!
There is a frontend on backbone.js + a backend on yii2. Upon authorization, yii2 returns an access_token. As I understand it, this access_token is further used in requests for authorization checks. Can anyone tell me how to store it correctly on the client, write it to cookies, or in some other way? How can I check when loading the page that the user is authorized, maybe there is some example?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aen, 2015-03-24
@vanlmshv

The user session is stored in cookies; when making requests from the client, you can see the session marker you need in the request headers. Thus, you will understand whether the user is authorized or not.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question