D
D
DEAtelnost2017-03-06 08:58:16
Unity
DEAtelnost, 2017-03-06 08:58:16

API OK. Unity SDK. When renewing a token, does a window constantly pop up asking for access to personal data?

Good afternoon,
I use OK Unity SDK 1.0.22 for Android, iOS platforms.
To renew the token, the code is used:

if (OK.IsInitialized)
            if (OK.AccessTokenExpiresAt < DateTime.Now)
            {
                if (OK.IsRefreshTokenValid)
                {
                    OK.RefreshAccessToken(success =>
                    {
                            OnOKLoginFinished(success, callback);
                    });
                }
                else
                {
                    OK.RefreshOAuth(success =>
                    {
                            OnOKLoginFinished(success, callback);
                    });
                }
            }

Please help me understand the following points:
1. The method for renewing the token "OK.RefreshAccessToken" each time asks the user for permission to use personal data by issuing a form asking for permission to invite friends, change status, etc. Although it should not, since permission was issued during authorization using the "OK.Auth" method.
2. "OK.Auth" brings up an authorization window. Is there a "back" button in it to close the authorization window?
3. Request window for the use of personal data. It has two main buttons "Allow" and "Cancel". The cancel button does not close the request window.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vjacheslav Kanivetc, 2017-03-06
@Vjaka

Can you still get a long token (LONG_ACCESS_TOKEN) and not deal with all sorts of session expiration and refresh tokens at all?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question