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

The OAuth 2.0 Client supports client authentication method 'client_secret_basic', but method 'client_secret_post' was requested. #394

Open
CursedJay opened this issue Aug 3, 2022 · 1 comment
Assignees

Comments

@CursedJay
Copy link

CursedJay commented Aug 3, 2022

Hey folks, I'm trying to set this up to use it with Marvel Strike Force's API (mobile game) but I can't make it work.
I keep getting this error when I'm redirected back from their login page.

Google Apps Script Error: Error retrieving token: invalid_client, Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). The OAuth 2.0 Client supports client authentication method 'client_secret_basic', but method 'client_secret_post' was requested. You must configure the OAuth 2.0 client's 'token_endpoint_auth_method' value to accept 'client_secret_post'. (line 553, file "Service")

I'm not sure how to fix it, I read through the documentation and tried a couple of things but nothing worked. This is how my service setup looks like:

function getOAuthService() {
  return OAuth2.createService('MSF')
      .setAuthorizationBaseUrl('https://hydra-public.prod.m3.scopelypv.com/oauth2/auth')
      .setTokenUrl('https://hydra-public.prod.m3.scopelypv.com/oauth2/token')
      .setClientId('xx')
      .setClientSecret('xx')
      .setScope('m3p.f.pr.inv openid offline')
      .setCallbackFunction('authCallback')
      .setCache(CacheService.getUserCache())
      .setPropertyStore(PropertiesService.getUserProperties());
}

Link to their "doc", there's not much in there: https://developer.marvelstrikeforce.com/beta/index.html

Not sure if I'm missing sometime or if the library is just incompatible with their API, any help is appreciated. Thank you!

@CursedJay
Copy link
Author

Is there a way to change 'token_endpoint_auth_method'? I tried with .setParam but still the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants