Registration app?

Hello all,

I’m planning to deploy a instance of Yunohost for a bunch of friends, a bit like a small-scale chaton.
I want it to be based on Yunohost both for its SSO feature <3 and because I’d also like to offer them to host their own instance in a later phase (so they already know the “product”).
Last step would be that they get their independence and setup an internet cube at home (one can dream, right?).

But, there is an issue: I don’t want to setup an account for everyone manually, then sent them their password on clear-text per mail, hoping they would change it.

So I found this app: https://github.com/YunoHost-Apps/subscribe_ynh but if I try to install it, I get a message stating that it is incompatible with my version of Yunohost (I didn’t really expect it to be compatible anyway).

Would there by any chance be a similar app that I could use? Or maybe I could help @ljf update the app (but I’m not into web dev, so I’m not sure what I could do)?

Or do you have any other suggestion that might help setup a semi-open yunohost?

Thanks in advance for your help. And thanks already for the amazing work done on Yunohost since so long.

In case you have to do it in this way, install Zerobin app, and send the password in this way, with burn after reading option activated.
And maybe generate a random (long) password, so they will copy-paste it and change it because it’s annoying :smiling_imp::innocent:

Solution 1: Updating the app

Solution 2: code your own
If you know PHP, have a look at my API: https://github.com/scith/yunohost-api-php
In my readme I have a code snippet to create a user.
What you have to do is to code a PHP page with a form.
However, there may be some security flaws, as the PHP api needs your YunoHost admin password… Not ideal. You can hardcore your admin password in your PHP file, which should be OK if you’re sure that nobody can access your source code (and if PHP does not stop to be interpreted by the server)…

1 Like

Great! With your api and my low dev leve, I was already able to have a simple but working Registration form in less than an hour.
Now, I need to make it bit more robust and good-looking.
But it totally fulfilled my needs. Thanks again.
If I can be picky, it would be nice to have error handling (existing username for example).

2 Likes

Feel free to contribute to the api if you wish :slight_smile:
Errors are already collected and sent to the php error log file.
I think I also put a debug mode somewhere but hard to check on my phone now

1 Like

Would love to try to use it o/

@Petitminion It would be a pleasure, but honestly it’s not in a state in which I can be shared.

It has plenty of hardcoded things specific to my instance, and it’s just a style-less html form that sends 4 data (fist name, last name, username and password) to a php script that generate the user and prints a also style-less html page that links to the major services of my instance.

It has no security whatsoever, is ugly and cannot be used as-is.

But you gave me the desire to make it better. I might take advantage of the current situation (covid lockdown) to dedicate some time to it. But if I succeed, it will certainly be low quality anyway (not a developer).