FOSOAuthServerBundle invalid client

848 views Asked by At

I tried to follow this blog

FOSOAuth Tutorials:

I followed all through his explanations except that I change this:

service:
    user_provider: fos_user.user_manager

to

service:
    user_provider: fos_user.user_provider.username

When I tried to get the auth on oauth/v2/token it tells me that my client is invalid.

{"error":"invalid_client","error_description":"The client credentials are invalid"}

This is my route:

http://lom_api.local/app_dev.php/oauth/v2/token?client_id=22fkr98hnts08ws8o4w8cg4wooogo8ck0gkkcowo4osgssskww&client_secret=e28421fn2aogcg0ccg4ggkk8oowsg840k4okc0wcc08c048sw&grant_type=password&username=admin&password=admin

What might be causing this error? Thanks!

1

There are 1 answers

2
Carlos On BEST ANSWER

Your client ID is wrong. It shoudl be 1_22fkr98hnts08ws8o4w8cg4wooogo8ck0gkkcowo4osgssskww

or

2_22fkr98hnts08ws8o4w8cg4wooogo8ck0gkkcowo4osgssskww

The first number is the row id on the Token table.