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

**URL:** <https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201>\
**Category:** Dev to Dev Hub\
**Tags:** extensions, custom-social-connections-extensions\
**Created:** [May 1, 2025, 2:46pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201 "2025-05-01T14:46:24Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![max91](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/max91/32/72479_2.png) [@max91](https://community.auth0.com/u/max91)\
**Post date:** [May 1, 2025, 2:46pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/1 "2025-05-01T14:46:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![max91](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/max91/32/72479_2.png) [@max91](https://community.auth0.com/u/max91)\
**Post date:** [May 1, 2025, 2:49pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/2 "2025-05-01T14:49:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [May 2, 2025, 5:50pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/4 "2025-05-02T17:50:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [May 2, 2025, 8:07pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/5 "2025-05-02T20:07:37Z")

</div>

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](http://id.vk.com). You can find more information on integrating their social connection with your applications [in their documentation](https://id.vk.com/about/business/go/docs/ru/vkid/latest/oauth-vk).

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

---

<div class="post-metadata">

**Author:** ![max91](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/max91/32/72479_2.png) [@max91](https://community.auth0.com/u/max91)\
**Post date:** [May 7, 2025, 5:20am UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/6 "2025-05-07T05:20:20Z")

</div>

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:

```javascript
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?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [May 8, 2025, 5:15pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/7 "2025-05-08T17:15:13Z")

</div>

Hi again!

Thanks for the update provided.

Most probably the error received when trying to save the template might be caused by the fact that you had multiple tabs opened with the same page which was causing conflicts on the dashboard whenever you were attempting to save the changes.

To provide you some updated on my end, I was able to make the social connection work by using the following settings for the custom login button:

- Authorization URL:

```auto
https://id.vk.com/authorize?response_type=code&client_id={{client_id of the vk app}}&
redirect_uri={{callback URL set inside the VK dashboard}}&
code_challenge={{generated code challange and verifier}}&
code_challenge_method=S256

```

- Token URL - `https://id.vk.com/oauth2/auth`
- Client ID - vk app id
- Client Secret - vk app protected/secure key
- Fetch User Profile - I used the same script you have provided//other sample scripts

The issue that I have ran into is that I am received an `invalid {{any user profile parameter}}` error, which it appears that the retrieved data is incorrect in order to build an user profile.

Regarding this, I would advise to contact VK support.

If you have any other questions, let me know!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![max91](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/max91/32/72479_2.png) [@max91](https://community.auth0.com/u/max91)\
**Post date:** [May 9, 2025, 9:30am UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/8 "2025-05-09T09:30:35Z")

</div>

1. Additional configuration was required: enabled PKCE for auth0 app for it to use code\_challenge
2. Got to the point where I receive `invalid {{any user profile parameter}}` error, too. Done some debugging:
  - Replaced “Fetch user profile script” with this one:
  - 

```javascript

```

function(accessToken, ctx, cb) {  
cb(new Error(JSON.stringify({  
ctx,  
accessToken  
})), null);  
}

````auto
   - Got this error:
   - ```json
{
  "error": "invalid_request",
  "error_description": {
    "ctx":{
      "error":"invalid_request",
      "error_description":"device_id is invalid",
      "options":{
        "scope":"vkid.personal_info",
        "tokenURL":"https :// id.vk .com/oauth2/auth",
        "client_id":"53519765",
        "pkce_enabled":true,
        "client_secret":"REDACTED",
        "authorizationURL":"https :// id.vk .com/authorize",
        "store":{}
      }
    },
    "accessToken":""
  }
}

````

Looks like Auth0 does not account for ‘device\_id’ parameter which is required in vk id auth flow. It first appears as the redirect callback query parameter (&device\_id=…) and should be passed along with the auth token for the rest of key exchange procedure.

I found `customScripts` property in the docs ( https :// auth0 .com/docs/api/management/v2/connections/patch-connections-by-id ) which can be used to set scripts for login, get\_user, delete, verify, create and change\_\* actions; none of these scripts seem to be applicable for altering key exchange flow; they seem to be Custom Database Action Scripts ( https :// auth0 .com/docs/authenticate/database-connections/custom-db/templates )  
Given the debug output, neither the original redirect url nor the device\_id parameter are present in the scope of get\_user method so I cannot implement auth flow using this entry point.

Do you know of any other options I have to affect initial key exchange flow to make use of device\_id parameter?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [May 9, 2025, 6:24pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/9 "2025-05-09T18:24:12Z")

</div>

I believe our documentation on [updating the authentication flow or the connection itself](https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2#update-authentication-flow) and how to [pass dynamic provider specific parameters](https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2#pass-dynamic-parameters) should be helpful.

This way, you should be able to set the connection to pass in the device\_id in order to exchange it for a valid access token.

Let me know if you have any other updates on the matter,

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 23, 2025, 6:25pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/10 "2025-05-23T18:25:04Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [September 5, 2025, 8:40pm UTC](https://community.auth0.com/t/vk-auth-plugin-selected-sign-in-method-not-available-for-app/186201/11 "2025-09-05T20:40:31Z")

</div>


