Xwiki credentials for other apps

Hi there.
We have an XWiki instance with few thousand users registered using normal Registration process. We are not using LDAP or the like.

Now we will be using a forum app “Discourse” for our needs (the one XWiki is using).

What we want:

  1. Login to forum using our wiki user credentials.
  2. If possible, SSO (single sign on).

Can someone pls guide us to the right direction?

Here is what we did for this Discourse instance:

Thank u. Is there anything I have to do in xwiki setup except installation of openID?

Nothing to configure usually, just install the OpenID Connect Provider.

where can i get these oauth2 configs? like oauth2 authorize url, token url, json url??

Have you installed the Oauth2 plugin on Discourse as I indicated ?

Yes I have installed oauth2 plugin on discourse as u said. Also installed openid on xwiki instance

And you don’t find the configuration field listed in my screenshot ? In Discourse setting you have a filter input where you can put “oauth2” to get only the settings you are interested in.

Oh u got me wrong. I found that in settings. But I’m not sure what URLs to use in the fields. I wanted to ask how can I know what URLs to type in there.

The endpoints are listed on https://extensions.xwiki.org/xwiki/bin/view/Extension/OpenID%20Connect/OpenID%20Connect%20Provider/. But simply take the URLs from the screenshot and replace the base URL with yours so generally something like https://myhost/xwiki/oidc/... (remove /xwiki if you installed XWiki as default application).

1 Like

Sorry but it is not working for me.
I did exactly as described:

  1. Installed OpenID connect provider
  2. In discourse OAuth2, entered the endpoints.
  3. I removed /xwiki as it is default application.
    It is taking me to my xwiki site but throws a notice that the page doesn’t exist. I have attached a screenshot below.

For login, it is redirecting me to

which in the case for XWiki discourse is


This suggest that the provider is not actually found (as if it was not really installed). Do you have any error in the log ? You might want to try to restart maybe.

the error says: Failed to load resource: the server responded with a status of 404 ()
i tried reinstalling oidc, restarting server, etc. but no luck yet

This one is because the provider is not there. I was referring to an error before that one that could help us find out why it was not initialized.