Jump to content

[JS] RAGE Accounts - Account System Boilerplate


Recommended Posts

Posted

NOTE: Requires RAGE:MP v1.1

Link: https://github.com/RageMpOpenSource/RAGE-Accounts

I've created an Account System boilerplate (pretty close to my MySQL resource) which I wanted to focus on something you can drag and drop and begin making a server without worrying about setting up a whole login and registration system. This isn't uploaded as a resource yet until I feel like it's a bigger difference to my current mysql resource or I feel like it's a much more solid base(and a better name). This focuses on creating a promise based script so if this was to be used you should look into promises and async/await and how they're used.

Would love if any NodeJS/Javascript developers wanted to look over and if they had any things that could be improved to create a pull request. You can also discuss more at our open source group which focuses on creating resources that are only open source.

https://discord.gg/44ZuWWN

Features

  • Login & Registration
    • Include error handling (taken usernames, incorrect passwords, already logged into accounts)
  • Bcrypt Password Hashing
  • Idle Kicker
    • Players get kicked after 60 seconds if they're sitting on the login screen without any login attempts
  • Server configuration 'settings'
    • Setup a quick JSON file for you to create any global settings your server may need
  • delayedInitilisation event example
    • We've utilised this new 1.1 function and event which stops any accounts from joining a server while it's starting up until all promise functions have successfully resolved.

 

The database contains an accounts table which holds

  • ID
  • Username
  • Password (hashed with Bcrypt)
  • email
  • registration date
  • last active (last time the account was logged in)
  • social club
  • social club ID
  • position
  • Like 2
  • Mask 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...