NamelessMC / Nameless

NamelessMC is a free, easy to use & powerful website software for your Minecraft server, which includes a large range of features.
https://namelessmc.com/
MIT License
604 stars 311 forks source link

AuthMe Integration fixes / enhancements #2586

Open TheJoshue opened 2 years ago

TheJoshue commented 2 years ago

Describe the feature

This post is actually combination of FIXES and ENHANCEMENTS for AuthMe Integration (for people who are using /register//login system mostly used on cracked/offline-mode MC servers.)

I've played with AuthMe Integration on NamelessMC for quite some time and I wanted to make it at least how I can easier for you guys to do this.

I've made a list of things what is needed to be done for AuthMe Integration to be (almost) perfectly working with namelessMC.

  1. Upon registration, either make sure that player inserts his EXACT MC username (lowercase/uppercase to be matched with HIS registered ingame name -- if his name is different than that same name but for premium player (premium MC: Test and the user registered on cracked server username: test, it'll still use test because that's what he registered ingame and that's the only name he can use to join the server (that is how AuthMe works))) or check AuthMe database for EXACT username for that player (this is so player can insert hellousername upon registration, but nameless will still set his username to HelloUsername because that is exact username he used to register ingame).
  2. Upon registration, you need to type in MC username from ingame and password for your ingame account. After that, nameless asks you to insert email. The problem here is that email can be ANYTHING!, And we can't allow anything but only ingame added email (using authme command /email add <address> <confirm_address>). The solution here is to force user to use ingame added email for the MC username and password he tried to register and if the email ingame isn't added when player tries to register and insert email on site, the site will throw message saying "Either incorrect email or you didn't set one ingame. Please do it and then go back here".
  3. Considering Authme Integration is enabled, we can keep "Forgot Password" but it'll instead show info and say to change password ingame or contact admin to change it.
  4. When you go to "NamelessMC > Profile Settings" and scroll down to "Change Email Address" & "Change Password", you will not have fields to write in because AuthMe Integration is enabled. You will instead have info blocks there and it'll show your current email address attached to your account, and below or above it will be info text on how to change email (ingame) and exactly same thing for password.
  5. When you update your email address ingame, it will immediately (just like password) be updated on site and it will be updated also in your "Profile Settings" where is your current email address shown (see the only image below for what it currently looks like). The thing is that when you try to update your email ingame you can't use the email that is already used so that is perfect and will not have any issues. image

I really hope this will help, i've put months of testing (not every day but every day is something different, and i've tested with multiple accounts, deleting accounts and adding new, switching DBs, etc.)

I hope some of the devs will have time to do this all, i think everything here is pretty simple because most of the stuff i mentioned here are already implemented somewhere (like you can't use any password for registering on site, you must use the password you used ingame -> copy that same code but for email when user need to add email upon registration!)

TheJoshue commented 10 months ago

anyone?