Skip to content

VKontakte strategy: Invalid request: versions below 5.21 are deprecated. #794

Description

@alexey2baranov

VKontakte strategy not works if you run example from doc

I ran example from http://www.passportjs.org/packages/passport-vk-strategy/
and got this error

error: {
error_code: 8,
error_msg: "Invalid request: versions below 5.21 are deprecated. Version param should be passed as "v". "version" param is invalid and not supported. For more information go to https://vk.com/dev/constant_version_updates",
error_stack: "VkontakteAPIError: Invalid request: versions below 5.21 are deprecated. Version param should be passed as "v". "version" param is invalid and not supported. For more information go to https://vk.com/dev/constant_version_updates at /home/alexey/WebstormProjects/kopnik-node/node_modules/passport-vk-strategy/lib/strategy.js:166:29 at passBackControl (/home/alexey/WebstormProjects/kopnik-node/node_modules/oauth/lib/oauth2.js:134:9) at IncomingMessage.<anonymous> (/home/alexey/WebstormProjects/kopnik-node/node_modules/oauth/lib/oauth2.js:157:7) at IncomingMessage.emit (node:events:388:22) at endReadableNT (node:internal/streams/readable:1305:12) at processTicksAndRejections (node:internal/process/task_queues:80:21)"
}

Expected behavior

should redirect to vk.com and ask creds

Actual behavior

throws error as under

Steps to reproduce

just run example from documentation http://www.passportjs.org/packages/passport-vk-strategy/

Environment

  • Operating System: Linux
  • Node version:15.1.0
  • passport version: 0.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions