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

Unable to authenticate with public application #9

Open
Nazalas opened this issue Sep 4, 2019 · 2 comments
Open

Unable to authenticate with public application #9

Nazalas opened this issue Sep 4, 2019 · 2 comments

Comments

@Nazalas
Copy link

Nazalas commented Sep 4, 2019

I am not sure if this is an issue with the package, the api, or my code but I am unable to get an access token on a public destiny app. Here is my error

Request error (invalid_request): Public client should not attempt to authenticate.

I tested and added this method to Api\Module\App.php and it seems to work.

public function getAccessTokenFromAuthCodePublic($authCode, $oAuthClientId)
{
return $this->apiClient->postAsForm('App/OAuth/Token', [
'client_id' => $oAuthClientId,
'grant_type' => 'authorization_code',
'code' => $authCode
]);
}

@adamdburton
Copy link
Owner

@Nazalas I believe you need to make a 'private' client instead of a 'public' client on the https://www.bungie.net/en/Application site.

@Nazalas
Copy link
Author

Nazalas commented Sep 4, 2019 via email

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