How can I store emails instead of username in the Firebase?

0 favourites
  • 8 posts
From the Asset Store
[C2] [C3] Support C3 build service and Android 14
  • I am using Firebase and the Rex plugins to create a login system. However, I can only capture the user name instead of the email. Whenever I include the "." (dot), data is not saved. Could someone help me to configure the system to accept emails? I am attaching the file. Thanks

    dropbox.com/s/ds2kyprjumqxr0v/login.c3p

  • I really don't understand why it is so difficult to get help on this forum. I think I asked the question correctly and even attached an example file. Could any "good soul" help me in this matter, PLS?

  • Likely, nobody knows your issue since it's an addon (ie, outside the norm).

    But, I'll venture to guess at a couple of things you might try (and I'm assuming a lot here).

    My guess is that Rex is using an ajax call and there is a php file somewhere on the back side passing info to a firebase database.

    Sounds like the "." is being read in a way you aren't intending.

    1. I'd try sending the email address as encode(email) first. Just to see if that solves it as an easy fix.

    2. On your side (c3), you might try a find and replace the "." with a "+" sign.

    condition: compare 2 variables - find(email,".") not equal to -1

    Action: set text to - replace(email,".","+") (doesn't have to be a "+", just the something that will pass via the ajax call without breaking the code. Reverse when you pull back the info from firebase.)

    Past that I pretty clueless.

  • Hi jsutton

    Thanks for helping me. I really appreciate that. Thanks for the suggestion. I believe I will have a hard time implementing this but I will give it a try. Did you check the file I shared? Is everything okay with the code?

  • firebase does not allow some characters

  • RBuster Sorry no, I don't have the plugin or dropbox.

    Based on what Eren stated, the find replace method looks like it should work.

    "As all Firebase Realtime Database data is stored as JSON objects, when you create your own keys, they must be UTF-8 encoded, can be a maximum of 768 bytes, and cannot contain ., $, #, [, ], /, or ASCII control characters 0-31 or 127."

    xspdf.com/resolution/59563609.html

    A find and replace looks like your easiest option since you can do everything on your side before sending. Then just reverse it when you pull the information back.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thank you, guys.

    jsutton I will try to implement what you suggested.

    I uploaded the file to WeTransfer in case you want to check the file

    we.tl/t-SWGlwVgZrq

    Thanks

  • Do you have a hosted website?

    Asking because in the past I tried using some of the plugins (what can I say, I'm cheap!), but I found that having access to phpmyadmin makes everything much easier.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)