[Flarum] A lightweight forum

I ran it with sudo (root) hence the error. Now with:

sudo -u www-data composer require --dev "tituspijean/flarum-ext-auth-ssowat:*@dev"

I (still) get the following error:

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package tituspijean/flarum-ext-auth-ssowat could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

The minimum-stability parameter in composer.json should be set to dev, am I right?

Awaiting for new instructions! :smiley:

In the script I see :

“minimum-stability”: “beta”

Perhaps you must precise the “beta” argument in the command ?

I’ve foud that : https://getcomposer.org/doc/articles/troubleshooting.md#package-not-found. Does it help to solve the error ?

I think registering the package to Packagelist can be a good idea. Flarum(and its extensions) is registered on it.

You just create an account and you submit your package(top right). It will work better I think.

because for adldap2/adldap2 it write the name of the package before lanuching the command. (Using version ^7.0 for adldap2/adldap2)

pi@yunohost:/var/www/flarum $ sudo -u www-data composer require --dev “adldap2/adldap2”
Using version ^7.0 for adldap2/adldap2
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals

  • Installing adldap2/adldap2 (v7.0.6) Downloading: 100%
    Package flagrow/flarum-ext-guardian is abandoned, you should avoid using it. No replacement was suggested.
    Writing lock file
    Generating autoload files

For tituspijean/flarum-ext-auth-ssowat, I don’t see this line.

pi@yunohost:/var/www/flarum $ sudo -u www-data composer require --dev “tituspijean/flarum-ext-auth-ssowat:*@dev
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Your requirements could not be resolved to an installable set of packages.

Problem 1
- The requested package tituspijean/flarum-ext-auth-ssowat could not be found in any version, there may be a typo in the package name.

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.

Installation failed, reverting ./composer.json to its original content.

Perhaps it’s the problem ?

I tried to set minimum-stability in composer.json from stable to dev (or even beta but it doesn’t make more sense here), and I always get the error.
Perhaps what you pointed out with registering the package can help!

Nice catch, I indeed forgot to publish the extension… :sweat: I thought composer was browsing Github automagically. I also removed the “beta” requirement, it doesn’t seem mandatory.

First things first, can you try to require without then with the --dev option ?

Alright, running: sudo -u www-data composer require tituspijean/flarum-ext-auth-ssowat:*@dev worked. :slight_smile:

I went then to the Admin panel to activate the extension called SSOwat login, which activated successfully.
However, when going back to the forum, I get the following error (in French on each pages, and in English when logging out):

Oups ! Quelque chose s’est mal passé. Veuillez actualiser la page puis réessayer.

̀Oops! Something went wrong. Please reload the page and try again.

And indeed refreshing the page allows the content to be displayed. However, this error occurs on each page I visit, so that I have to refresh to overcome it.

On avance ! :slight_smile:

Thanks !

That’s weird, I only have this error once, when signing up. Can you activate Flarum’s debugging (in config.php) and create an issue with the verbose error ?

I will look into it tonight or this weekend.

OK, I will.

I noticed the Login with SSOwat button on top of the login/password prompt in the Login popup window. It brings me to a 404 error page, trying to reach: https://domain.tld/yunohost/sso/?r=some hash with some hash being some 40 long characters.

Also, when login within YunoHost SSO and then starting Flarum, I do have to login (with the same YunoHost login/password) in order to get logged in, even though the extension is on (in other words, I can’t make it work).

Let me precise that I cleared all sessions and cache before trying what I just described.

Thanks for your involvement :slight_smile: , hope we will make it out!

Hopefully we will debug that !

Can you log out from YunoHost, then reach https://domain/ssowat/?r=your hash directly from your browser ?

The hash should be a base64 encoding of https://domain/flarum/auth/ssowat, to tell SSOwat where to redirect you after logging in. The /auth/ssowat page handles your credentials, connects to LDAP and send them to Flarum.

Still getting the 404 error page when trying directly from the browser after logging out from YunoHost.

Note that the Flarum package is installed at the root (say https://subdomain2.domain.tld/ and not https://subdomain2.domain.tld/flarum/) of a sub-domain which is not the same as my principal YunoHost domain (which could read in this example as https://subdomain1.domain.tld/).

1 Like

Ah ! Cross-domain authentication. I will look into it this weekend.

1 Like

Just in case it can help, since you underline the fact that there is some cross-domain authentication to make things more exciting, I can somewhat confirm what you point out:

If I try to reach https://subdomain1.domain.tld/ssowat/?r=hash (note that I wrote purposely subdomain1, i.e. the “principal” one for my YunoHost config, not the one chosen for Flarum, which is in my example would be https://subdomain2.domain.tld/?r=hash which gives a 404 error), I end up on a blank page with the address https://subdomain2.domain.tld/auth/ssowat (now note subdomain2 here).

Hope this is understandable :blush:

Good night!

I have updated the extension :

  • Everything goes trough HTTP headers now, I dropped LDAP
  • There is now a setting panel on Flarum’s admin that allow you to set SSOwat’s domain

You may need to composer remove then require again, as I did not update the development version.
Can you tell me if that works ?

Now the link Login with SSOwat points to:

https://yunohost/sso/?r=aHR0cHM6Ly9zdWJkb21haW4yLmRvbWFpbi50bGQvYXV0aC9zc293YXQ=

(I have changed the above hash). The hash corresponds to https://subdomain2.domain.tld/auth/ssowat, where subdomain2 is the one pointing to the Flarum install.

Do you want me to discuss this issue with you on your GitHub repo instead of here?

Thanks!

Let’s continue on Github after this message.

I think you forgot to set subdomain1 in Flarum’s admin. :wink:
SSOwat settings are on the left panel in the admin.

thx a lot <3

I have just discovered Flarum and this _ynh package. What a good work ! Many thanks @tituspijean

You’re welcome ! There’s a big improvement update coming very soon™, with the SSOwat login. Keep posted !

1 Like

Do you need any support to have backup and update working fully ?

I see on jenkins it is still not a green light ? http://ci-apps.yunohost.org/jenkins/job/flarum%20(Community)/