B
B
bes_ventura2016-04-10 19:09:07
Classmates
bes_ventura, 2016-04-10 19:09:07

Authorization and "remember me"?

Hello. I am new to this matter.
Already covered everything. (I have never seen such terrible and complex documentation as in OK)
The point is. I am writing a PC client VK / OK. How to implement the "remember me" feature in OK?
How do I do for VK. I form an authorization link, the user enters, gives permission to the application. Then I get an access_token and use the VK API. For future use, I store this token so that the user does not log in again.
After reading the OK docks, I swam with my brain. How to do the same with OK?
What I understood from the docks is that during authorization we get access_token and secret_session_key, which are used to work with the OK API. Keep them? If it is written about the life of the token, then what about the secret_session_key? Do you have to log in every time?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vjacheslav Kanivetc, 2016-04-11
@Vjaka

access_token and session_secret_key are related - it's a session pair - like public and private keys.
Therefore, it makes no sense to store only the token. We must also remember that the OAUTH session ends quickly.
You can alternatively request a LONG_ACCESS_TOKEN permission via [email protected] - it may well live for a month, and the issue of renewal will not be so acute.

Z
Zuma Zeke, 2016-05-08
@Zuma810

Yes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question