nokia / kong-oidc

OIDC plugin for Kong
Apache License 2.0
461 stars 330 forks source link

What should i add consumer in kong? #69

Closed ShiningRush closed 6 years ago

ShiningRush commented 6 years ago

When i have configured kong-oidc and request to my api, it is successful to redirect to op and login. But after login then redirect to my api , i get a error like that

response indicates failure, status=400, body={"error":"invalid_client","error_description":"The specified client credentials are invalid."}

I have checked cookie and urls, there are already session and authorization code in query string. What else need i configure? Any idea is appreciated.

Trojan295 commented 6 years ago

Are the client credentials (client_id and client_secret) correct?

ShiningRush commented 6 years ago

I have ensured the credentials of oidc plugin is right. Am i need to add a consumer to Kong?

Trojan295 commented 6 years ago

No, you don't need any consumer registered in Kong.

This error indicates a some wrong configuration of the client credentials on Kong OIDC plugin side or a wrong configuration of the OIDC client in the OIDC Provider. What OIDC provider are you using? Have you configured the redirect url right and is the Authorization Code flow enabled in the OIDC Provider?

ShiningRush commented 6 years ago

@Trojan295 Thanks, It is my fault to configure a wrong secret.