-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vkontakte Auth: Change users.get to secure.checkToken #2880
Conversation
You can't get user info by client token due vk restrictions. You must check token via secure.checkToken.
@antigp Thanks for the PR! Can you add some checks that the vk oauth is properly configured with the clientSecret etc... ? |
@flovilmart Where should I do it? In validateAppId or validateAuthData? |
It should be in validateAuthData as you need the app access token in order to validated the user access token right? |
Yes. |
@antigp updated the pull request - view changes |
Looks like a test if failing, which is good as we enforced new parameters. Can you update the tests? |
@antigp updated the pull request - view changes |
@flovilmart, Sorry but i am new in nodejs, i am iOS dev. I'm don't found how i can check new params in test. I change code to correspond "OAuth Should validate structure of vkontakte" test. Now it always return promise, that check config params. And add error message to logger on error, as it make twitter auth. |
@antigp it's looking very good! Thanks!! |
You can't get user info by client token due vk restrictions for standalone app. Current code did work, and always get error in production. (User authorization failed: access_token was given to another ip address.) You must check token via secure.checkToken.
https://vk.com/dev/secure.checkToken
To enable client token verification, you mast set appIds and appSecret parameter in oauth dictionary: