Monstera Login Menu

Monstera Login Menu is a fully functional login and registration system created in Unity. It has user authentication, password reset screens, and a unique username check—all with Google Firebase. Firebase automatically handles our database operations, allowing you to maintain a simple login without much hassle.

CONCEPT INSPIRATION

The style and layout were inspired by Valorant concept art from Felipe Viana, whose work I wanted to.. well.. actually work!

QUICK START

  1. Create a free Firebase project and enable Email-Authentication under the Authentication tab.
  2. Create a Realtime Database and apply the rules shown below.
  3. In your Firebase project settings, add a new Unity app and download your google-services.json file.
  4. Place google-services.json at the root of your Unity Assets directory.
  5. Adjust any of the UI (images, fonts, etc.) in Unity to fit your game.
  6. Build and run!. Our menu will now use Firebase for user registration, login, and password resets.

Firebase Rules

Below are the rules you'll need for your Firebase to restrict access to authenticated users and only allow users to read/write their own data.

{
  "rules": {
    ".read": "auth !== null",
    ".write": "auth !== null",
    "users": {
      "$uid": {
        ".write": "auth !== null && auth.uid === $uid",
        ".read": "auth !== null && auth.provider === 'password'",
        "username": {
          ".validate": "
            !root.child('usernames').child(newData.val()).exists() ||
            root.child('usernames').child(newData.val()).val() == $uid"
        }
      }
    }
  }
}

ACKNOWLEDGEMENTS

Parts of this implementation were inspired by XZippyZachX's Firebase Auth Tutorial.

Thanks again to Felipe Viana.