How do you add Wordpress as an Identity provider in Keycloak?

1.7k Views Asked by At

I am trying to authenticate mattermost for my users with keycloak. Now, there is is requirement that signing in to keycloak also has a Wordpress ODIC enabled.

I tried creating a new Identity Provider, but there was no option of Wordpress under social tab. The tab has Github, Gitlab, etc. but I don't need that. So, I selected a more generic option User defined OIDC. And inside that, I entered the following information:

Authorization URL: http://virtual.host/oauth/authorize
Token URL: http://virtual.host/oauth/token
User Info URL: http://virtual.host/oauth/me

Client ID: ****
Client Secret: *****

Client Authentication: 'Client Secret sent as post'

On the Wordpress, I created a client with defaults. For the server, I am using this plugin on Wordpress.

When I process to login to mattermost, I am redirected to keycloak's page. There, I can see an option Login with wordpress. Upon selecting and signing in there, I am redirected back to keycloak. But there, I see the following message:

We are sorry...
Unexpected error when authenticating with identity provider

In the network tab, I get 502 Bad Gateway.

How do I fix this? Or is there something that I am doing wrong. Please help me out. Thanks.

0

There are 0 best solutions below