(oauth2_basic) Authentication failure!

(Sulman Bashir) #1

Hi, im trying to use the oauth2_basic plugin in my discourse forum but it doesn’t work ! I don’t know why and i don’t understand this error :

“(oauth2_basic) Authentication failure! invalid_credentials: OAuth2::Error, unauthorized_client: The grant type is unauthorized for this client_id
{“error”:“unauthorized_client”,“error_description”:“The grant type is unauthorized for this client_id”}”

All information in my admin panel are good and i can get the access token successfully but with this error … Could you please help me :disappointed:

Thanks a lot

(Bhanu Sharma) #2

Which Oauth Provider have You configured?

(Sulman Bashir) #3


I used my own db to connect the member from my app to my discourse forum

(Bhanu Sharma) #4

is Your app based on oAuth 2 protocol? and where did you configured the tokens for your app? AFAIK discourse only has some selective oauth2 providers supported!

did your write some custom plugin?

(Sulman Bashir) #5

Yes my app is based on oauth2.0 protocol. I don’t think the problem come from my server side. I do not write plugin because it’s my first time use of discourse and i don’t know how i can made my own custom plugin…

(Bhanu Sharma) #6

Please Try the solutions mentioned in this Thread

You probably need to create a small plugin and rebuild your discourse instance with that, you can choose to hardcode values or make them variable by registering an admin panel entry. all required steps are available here.

(Sulman Bashir) #7

Thank you, im going to try this =)