Skip to content
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 Adapter fails authentication. #8626

Open
MattKirchhof opened this issue Jun 9, 2023 · 4 comments · May be fixed by #8640
Open

Vkontakte Adapter fails authentication. #8626

MattKirchhof opened this issue Jun 9, 2023 · 4 comments · May be fixed by #8640
Labels
type:bug Impaired feature or lacking behavior that is likely assumed

Comments

@MattKirchhof
Copy link

MattKirchhof commented Jun 9, 2023

New Issue Checklist

Issue Description

Vkontakte Adapter fails authentication.

When trying to use Parse to authenticate a vkontakte account holder (via Adapters/Auth/vkontakte.js), we encounter the following error:

"Parse error: Vk appIds or appSecret is incorrect."

stack trace:

"Error: Vk appIds or appSecret is incorrect.at /app/node_modules/parse-server/lib/Adapters/Auth/vkontakte.js:20:11
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Promise.all (index 0)"

We have noticed that the vkontakte.js file has not been updated since 2020. We have verified multiple times that our appId and secret are correct and unchanged.

After contacting VK support, they noted an API change as of Oct 2022. See their response:

Reply - "Since October 17, 2022, we have disabled the ability to obtain a service token through the Client Credentials Flow: https://dev.vk.com/reference/roadmap#Disabling_Clien... If you are working with methods in the secure section, you need to use the service key from the application settings."

Steps to reproduce

Any login via vkontakte results in this error

When performing the request manually via curl (following current vkontakte.js current implementation), we receive an error:

curl -X POST 'https://oauth.vk.com/access_token'
-d 'grant_type=client_credentials'
-d 'client_id=0000000'
-d 'client_secret=XXXXXXXXXXXXXXXXXXXX'
-d 'v=5.124'

{"error":"invalid_grant","error_description":"Access denied"}

Actual Outcome

See above stack trace and error

Server

  • Parse Server version: 4.10.4 ( we think? most recent vkontakte Adapter is present.)
  • Operating system: `Linux
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): AWS

Database

  • System (MongoDB or Postgres): PSQL
  • Database version:
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): AWS

Client

  • SDK (iOS, Android, JavaScript, PHP, Unity, etc): Any client
  • SDK version:

Logs

{"code":101,"level":"error","message":"Parse error: Vk appIds or appSecret is incorrect.","stack":"Error: Vk appIds or appSecret is incorrect.\n at /app/node_modules/parse-server/lib/Adapters/Auth/vkontakte.js:20:11\n at runMicrotasks ()\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Promise.all (index 0)"}

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jun 9, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added the type:bug Impaired feature or lacking behavior that is likely assumed label Jun 10, 2023
@mtrezza
Copy link
Member

mtrezza commented Jun 10, 2023

Thanks for reporting this; do you want to open a PR to make the API changes?

@MattKirchhof
Copy link
Author

Sure! I have a fixed version of vkontakte.js ready for review, if you could help me open a PR to do so.

@mtrezza
Copy link
Member

mtrezza commented Jun 16, 2023

See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Impaired feature or lacking behavior that is likely assumed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants