Forgotten password - reset via email

Hey,

As many requested, I have implemented a reset password feature on the ‘outside’ of Flake’s manager. This means you do NOT have to login to the manager to reset your password, you can click the reset password button on the front page of the login.

What it does?

Assuming the user remembered the email they registered with for the CPPS, they can use that email to reset their password. Simply enter the email of the account they want to reset.

It will then send a reset password link to the email, which has a unique ID within the link. The link is available for 12 hours, it expires afterwards. It can also only be used once, if the password is changed using the link, the availability of the link would be purged via the database.

How to setup?

This is somewhat simple to setup, remember that the feature for this is disabled by default so you won’t see the reset password button until you set it to reset_password to the value 1 in Config.js.

You first need to create or use an existing gmail account. You should be prepared to give the username and password to the flake manager so that it’s able to send emails from the account. I would suggest creating a gmail account dedicated to the password reset feature, all it will do is send emails but not receive any. Name it anything i.e. [email protected]

Once the account is created, make sure you put the email and password in Config.js as shown:

gmail

You should then enter the sub-domain you are using to host the manager, in most cases people create sub-domains dedicated to the manager. For example, mycpps.pw is just a domain, which is what we DON’T want. We want to use the sub domain i.e. most people would choose account.mycpps.pw or manager.mycpps.pw as the link to load the manager, which is what we want. In that case you should put your sub domain in there.

An example is shown below, but remember to enter it based on your flake manager setup!

subdomain

For cpps_name, just enter the name of your CPPS.

The password reset feature also uses a whole new table that is NOT included in Houdini by default. So for this feature to work, you need to make an SQL query within the database your using for Houdini. Whatever database management tool you use i.e. Datagrip, Sequel Pro or Navicat, go to the console/SQL query tab where you can execute SQL queries. Execute the following from this pastebin: https://pastebin.com/KhdRsDLE.

NOTE: You can also do this via SSH!

Go to terminal/putty, if you are a root user just do mysql -u root -p or the same command for mariadb and it should log you into mysql/mariadb’s console instantly. Then execute the following pastebin: https://pastebin.com/KhdRsDLE. Make sure to click enter at the end as a bit of SQL may be left within the console but not executed.

Stuck? There are many online guides that give support on how to access your database, either via desktop software, web-server or via SSH.

Finally, assuming the flake manager is setup i.e. you followed the instructions in the README of the github, installed all the packages, configured all specific details (database, http, features) You should be good to go.

If you run into an issue, i.e. something is taking a long time to load or something crashes, use terminal/putty. Run it w/o using pm2 or screen and check what appears on terminal.

If you don’t want to use this feature at all, you don’t have to fill in any of the reset_password_mail configuration details, just make sure reset_password is set to 0 like shown:

Last thing you need to ensure is that the gmail account you use allows less secure app access, via here https://myaccount.google.com/lesssecureapps?pli=1.

Enjoy, any issues leave a reply or ask in our Discord server.

CURRENT FEATURES OF FLAKE’S MANAGER:

  • Redemption System (optional to the owner)
  • Password reset (available both before and after logging in)
  • Email change
  • Ban a user
  • Unban a user
  • Edit any users username, password, email, coins, active/approval/moderator field as staff.
  • Add any item (optional to the owner)
  • Approve a user
  • Graphical avatar representation

https://vimeo.com/331130734 (old screen record with some missing features)
https://imgur.com/a/8ap1RYY,
https://imgur.com/a/ezJTQkV

~ ro

1 Like