Vk auth plugin: Selected sign-in method not available for app

I am trying to set up vkontakte auth plugin for auth0 by its Setup Guide:

  1. Created a vk id app; got app ID and secure key; made the app “enabled and accessible by everyone”
  2. Added a social connection using vkontakte plugin:
    • Application ID: 8 digits from vk id app settings (53519765)
    • Secure key: secure key from vk id app settings
    • Attributes: basic profile only
    • Permissions: none (all boxes unticked)
    • Additional Scopes: none (empty textarea)
    • Sync user profile attributes at each login: yes (default value)
  3. Enabled vkontakte connection for my application
  4. Found my app domain (dev-wm6gx6s70lw6eu23 . us . auth0 . com) and configured vk id application (Base domain, Trusted redirect URL)

After configuring, I tried to test the conection (Try Connection button) and got this:

URL: oauth . vk . com /authorize?login_hint=&prompt=login&response_type=code&redirect_uri=https%3A%2F%MY_DOMAIN%2Flogin%2Fcallback&scope=profile&state=x0mLzikO8l2wSia2uf5ZYKq82ePMOEzE&client_id=53519765

Selected sign-in method not available for app. Please try again later or contact the app administrator

Double-checked:

  1. App credentials
  2. Auth0 domain
  3. Everything else from vkontakte plugin’s Setup Guide

Looks either I am doing something wrong or vk id have made some changes to their authentication protocol.
Can you by any chance notice what am I doing wrong?
Are there any possible workarounds you might know about?
Is it possible to write a custom auth plugin for Auth0?

Quick note: MY_DOMAIN part in the authorize URL is my actual app domain (replaced due to hyperlink protection)

Hi @max91

Welcome to the Auth0 Community!

Thank you for providing information on the matter, I was able to reproduce your problem by using the VK Plugin and by creating a custom social connection as well.

If you have not created a custom social connection for VK, could you please give that a try as well? If you have any issues, I can help you out with that.

I will come back with more information as soon as possible!

Kind Regards,
Nik

1 Like

Hi again!

I believe that the VK Plugin might be outdated regarding the matter. As far as I have researched, the previous authentication api which was used to integrate web applications with their social website has migrated to id.vk.com. You can find more information on integrating their social connection with your applications in their documentation.

By following this documentation, you should be able to create a custom social button within Auth0 by using the credentials of a web application created on the website mentioned above.

I am currently still having issues in making the integration function successfully, however, if you need any help on the matter, let me know! I will come back with an update in regards to the integration from my end!

Kind Regards,
Nik

1 Like

Hi @nik.baleca,
Thank you for your response!

Regarding “a custom social connection for VK”: I’m stuck at saving my custom connection.
Trying to do the following:

  1. Client ID, client secret: using values from my vk id app
  2. Auth url, token url, scopes: values are set according to vk id documentation
  3. Separate scopes with space: disabled (default value; using only one scope — “vkid.personal_info”)
  4. Fetch User Profile Script:
function(accessToken, ctx, cb) {
    const url = "https://id.vk.com/oauth2/public_info";
    request.get(
        {
            url,
            headers: {
                "Authorization": `Bearer ${accessToken}`
            }
        },
        (error, response, body) => {
            if (error) {
                return cb(error);
            }
            if (response.statusCode !== 200) {
                return cb(new Error(body));
            }
            let bodyParsed;
            try {
                bodyParsed = JSON.parse(body);
            } catch (jsonError) {
                return cb(new Error(body));
            }
            const profile = {
                user_id: bodyParsed.user.user_id,
                email: bodyParsed.user.email,
                email_verified: true,
                name: bodyParsed.user.first_name + " " + bodyParsed.user.last_name,
                picture: bodyParsed.user.avatar
            };
            cb(null, profile);
        }
    );
}

(didn’t find any docs, adapted script from medium . com/%40colin.douglas/creating-a-custom-social-connection-between-auth0-and-gitlab-saas-4d22864cf503 )
5. Custom Headers: none (empty text area)
6. Sync user profile attributes on each login: enabled (default value)

When trying to save I get this: 403 Forbidden / Error! You don’t have permissions to access the resource. There are no additional details in the response body.

Is there some limitation disabling me from saving a custom social login provider or is there another reason behind the case?