Answer the question
In order to leave comments, you need to log in
What is accessToken and authToken and what is the difference?
In the basic Yii2 example, the user has two columns - accessToken and authToken.
They are not described in the documentation.
Why are they needed and what is the difference between them?
As I understand it, the logic is something like this: at the time of user authorization, he receives a randomly generated accessToken. After that, it writes this accessToken in cookies and passes it in the header with each request, so the application understands which user is accessing it. I'm right?
Then why is authKey needed?
Answer the question
In order to leave comments, you need to log in
accessToken - session token (it is always created inside authToken)
authToken - authorization token (creates a user session based on protocol and authentication data)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question