H
H
HellYeahOmg2019-05-13 23:24:17
Node.js
HellYeahOmg, 2019-05-13 23:24:17

How to fix open api vk?

I'm testing oauth vk.
There is a back on the node, the implementation of oauth via passportjs with the strategy passport-vkontakte.

Strategy config
new AuthVKStrategy(
    {
      clientID: config.get("auth:vk:app_id"),
      clientSecret: config.get("auth:vk:secret"),
      callbackURL: "http://localhost:8023/auth/vk/callback"
    },

I launch the back from localhost:8023, respectively, in the VK application settings, the picture in the photo:
A photo
5cd9d1e3a6c9c053656119.png

When I try to login I get
{"error":"invalid_request","error_description":"redirect_uri is incorrect, check application redirect uri in the settings page"}

What needs to be fixed? Tried tricks with empty redirect address and 127.0.0.1...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Aksentiev, 2019-05-13
@Sanasol

Probably because localhost:8023 and localhost are not the same, but this is not certain.
there may also be a standalone application with open api turned off
and in the end you can try passing an empty redirect_uri

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question