# SQL Backend & Joomla!

**URL:** <https://help.nextcloud.com/t/sql-backend-joomla/100152>\
**Category:** ℹ️ Support\
**Created:** [December 3, 2020, 9:44pm UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152 "2020-12-03T21:44:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![eMarcusNet](https://help.nextcloud.com/user_avatar/help.nextcloud.com/emarcusnet/32/4203_2.png) [@eMarcusNet](https://help.nextcloud.com/u/eMarcusNet)\
**Post date:** [December 3, 2020, 9:44pm UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/1 "2020-12-03T21:44:40Z")

</div>

I try to provide some kind of single-sign-on experience for my Nextcloud and Joomla users. Nextcloud is able to read out all users from the Joomla users SQL table, but I am not able to login with a joomla user to Nextcloud.

I made some tests with a mockup joomla user database and it turns out that “plain text” passwords seem to work. So to me it looks like that the used password hash method is not compatible with Joomla. I tried

Joomla MD5 (as this was an obvious choice to try) and  
Blowfish (because I read it somewhere)

none of them are working.

Versions: Nextcloud 19.0.2  
Joomla: 3.9.23

Any help appreciated  
Marcus.

---

<div class="post-metadata">

**Author:** ![j-ed](https://help.nextcloud.com/user_avatar/help.nextcloud.com/j-ed/32/7281_2.png) [@j-ed](https://help.nextcloud.com/u/j-ed)\
**Post date:** [December 4, 2020, 9:09am UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/2 "2020-12-04T09:09:25Z")

</div>

I personally don’t use Joomla but I can imagine that an external program, like Nextcloud, could have problems when directly accessing password data. Therefore I would recommend to reconfigure Joomla so that it acts as an [OAuth2 server](https://extensions.joomla.org/extension/oauth-server-for-joomla/) and then let Nextcloud connect to it by using Oauth2 authentication. This is e.g. provided by the [Social Login app](https://apps.nextcloud.com/apps/sociallogin).

BTW, the other way round would also possible, because Nextcloud can act as an Oauth2 server out of the box. You would only have to find an Oauth2 client plugin for Joomla 😉

---

<div class="post-metadata">

**Author:** ![eMarcusNet](https://help.nextcloud.com/user_avatar/help.nextcloud.com/emarcusnet/32/4203_2.png) [@eMarcusNet](https://help.nextcloud.com/u/eMarcusNet)\
**Post date:** [December 4, 2020, 12:01pm UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/3 "2020-12-04T12:01:12Z")

</div>

Thanks for your answer. How would I enable oauth2 server functionality in Joomla? Is there an extension available?

Thanks,  
Marcus.

---

<div class="post-metadata">

**Author:** ![j-ed](https://help.nextcloud.com/user_avatar/help.nextcloud.com/j-ed/32/7281_2.png) [@j-ed](https://help.nextcloud.com/u/j-ed)\
**Post date:** [December 4, 2020, 12:05pm UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/4 "2020-12-04T12:05:53Z")

</div>

Follow the link in my posting or ask aunt G. for help 😉

---

<div class="post-metadata">

**Author:** ![eMarcusNet](https://help.nextcloud.com/user_avatar/help.nextcloud.com/emarcusnet/32/4203_2.png) [@eMarcusNet](https://help.nextcloud.com/u/eMarcusNet)\
**Post date:** [December 4, 2020, 1:06pm UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/5 "2020-12-04T13:06:38Z")

</div>

Thanks (sorry, should have read your answer more carefully). I managed to setup OAuth server and social login app, but only get the following error after authenticating on the Joomla login page:

`Provider API returned an unexpected response.`

there is no entry in the log file (at least not visible in the Nextcloud GUI, even when I select all type of log file entries).

Any hint how to troubleshoot?

Marcus.

---

<div class="post-metadata">

**Author:** ![j-ed](https://help.nextcloud.com/user_avatar/help.nextcloud.com/j-ed/32/7281_2.png) [@j-ed](https://help.nextcloud.com/u/j-ed)\
**Post date:** [December 5, 2020, 10:28am UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/6 "2020-12-05T10:28:32Z")

</div>

> [@eMarcusNet](#):
>
> Any hint how to troubleshoot?

Unfortunately you only provided a shortened log message which doesn’t provide further information which might help to narrow down the problem. Perhaps the following issue tickets gives you an idea how a detailed problem report should look like and how ta problem can be troubleshooted.

> <https://github.com/zorn-v/nextcloud-social-login/issues/42>
>
> Hi,
> I want to connect to Azure Active Directory with the OAuth2 provider. An ap…plication with necessary redirect\_url... has been created.
> When I try to log in, I get the error
> \`Unable to exchange code for API access token. HTTP error 400. Raw Provider API response: {"error":"invalid\_request","error\_description":"AADSTS90014: The request body must contain the following parameter: 'grant\_type'.\\r\\nTrace ID: 1ae94aaf-e1d9-4678-9892-3b5bcd091d00\\r\\nCorrelation ID: 9f2c1f67-2961-490f-a330-13399888fdb5\\r\\nTimestamp: 2018-07-22 20:31:10Z","error\_codes":\[90014\],"timestamp":"2018-07-22 20:31:10Z","trace\_id":"1ae94aaf-e1d9-4678-9892-3b5bcd091d00","correlation\_id":"9f2c1f67-2961-490f-a330-13399888fdb5"}.\`
> 
> !\[custom\_oauth2\](https://user-images.githubusercontent.com/5988767/43087610-8c51d132-8ea0-11e8-9ac0-ed2e79b53bfd.PNG)
> 
> From my understanding the grant\_type should be passed within the body as POST parameter.
> Did anybody successfully connect via OAuth2 to an AAD?

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 7:52pm UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/7 "2024-12-12T19:52:49Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 7:52pm UTC](https://help.nextcloud.com/t/sql-backend-joomla/100152/8 "2024-12-12T19:52:50Z")

</div>


