Does Firebase support email addresses with Unicode character like smart apostrophes (’)? - firebase

I created a user using the firebase.auth().createUserWithEmailAndPassword and the email id which i used to register have smart apostrophes which unicode is U+2019. for example trap’py#gmail.com. User created successful but while sending the email verification link to the user using the firebase.auth().currentUser.sendEmailVerification function i get an error that
`
{"code":"auth/invalid-recipient-email","message":"Missing recipients"}
NOTE: This work fine if i use only ASCII character in my email instead of NO-ASCII character.
I try with other non-ASCII character and get the same result. In the documentation, did not find any information regarding the international email address. Send a user a verification email

Related

Set password and verify email in one step

Lots of questions about email verification here on SO, but none seem to cover my scenario.
We would like to add users ourselves after an intake meeting. Our representative has a form to enter some details like company name, VAT number, contact data (which contains an email field), ... This data is saved in Firestore.
After this, an email is sent to the supplied email address which contains a link that takes the user to a form where his/her email address is displayed with a password and a password confirmation input field. When submitting this field, the user is created.
But now the user receives an email asking to confirm their email address. I assume, for security and privacy reasons, there's no way I can set the user's email address as verified.
I've looked at customizing the verification email, but that doesn't seem to solve my problem.
Creating the user with a random password after the intake meeting also doesn't seem to be a solution, as the user still has to verify and then reset the password in 2 steps. Or can I somehow redirect after the email verification to the 'set password' page? That would be an acceptable solution.
Is there any way to achieve the desired flow described above?
As a general workflow, you could achieve this using a Cloud Function along with either database system. You can also make use of App Check to further secure this process.
Representative adds base user information in their portal. Store the data securely in the database of your choice.
Send the user an invite email containing a short-lived verification token linked with the email added by the representative (this could be generated and fired off using an onCreate Cloud Function once the invitee's data is added to the database). This token should follow some standard like JWT so you can deserialize the contained email address or be exchangeable for the underlying email address.
When user clicks/copies the link to their browser, present them with an input form asking for the desired email and password. Note: the email field should be editable! The rep may have used an email the new user doesn't want to use with your platform.
If the token is still valid and not consumed, continue with the next steps.
If the token has expired and not consumed, send another email to reconfirm their email and restart this step.
If the token is already consumed, show an error and don't continue.
Submit the email, password and emailed token to your backend via a Callable Cloud Function.
Sign the user in using the authentication token returned by the function on success. Show an error otherwise.
In the callable function for creating the user:
Confirm the request comes from your app (if using App Check)
Confirm the validity of the emailed token
Pull the data the representative entered from the database linked with the emailed token's original email address.
Using that data, the updated email, the new password, and emailVerified=true, call the createUser API.
Using the User ID from the returned UserRecord, create the user's profile data in the database and also create a Custom Authentication Token.
Once their data has been created and the token generated, return the authentication token as the result of the request.

How to register a user whose email contains a capital letter in Firebase Authentication

I am using Firebase email and password authentication for user authentication in my app. One user's email contains uppercase letters, but when I add the user on the Firebase console, it creates a user with the email converted to lowercase. For example, adding a user with an email of AAAA#gmail.com will create a user with an email of aaaa#gmail.com. Is it possible to add a user with the email in uppercase (e.g. AAAA#gmail.com)?
when I add the user on the Firebase console, it creates a user with the email converted to lowercase
That's what the Firebase console does. It will always convert the capital letters in the email address into lowercase letters. Why? Because the email addresses are case-insensitive. What does it mean? It means that while authenticating, the uppercase and lowercase letters are interpreted as being the same. That being said, all letters are converted to lowercase letters.
Is it possible to add a user with the email in uppercase (e.g. AAAA#gmail.com)?
No, it's not possible to change that in the Firebase console. If you want to have the email addresses case insensitive, then you should store them either in Cloud Firestore or in the Realtime Database that way. But remember, while authenticating, the email address that is used is always lowercase.

Wordpress Error when entering Paypal email address into Woocommerce

I am attempting to link a client's PayPal account to Woocommerce. In the field that says PayPal Email, I am entering the client's email address that they used to create the business account. But, I am getting a return error that states A part followed by '#' should not contain the symbol ". There are no " symbols in the email address. The email address looks like this abcdefg.xyz#gmail.com. I am wondering if the . between the words before the # symbol is the culprit for returning this error? There is only one email address in the field so it's not a problem of separating email address with the , symbol.
It might be the problem, you could have them add and confirm abcdefgxyz #gmail.com in https://www.paypal.com/businessprofile/settings/email and see if that helps (Gmail ignores dots)
It would be best to configure the most recent WooCommerce module for PayPal that uses an API to process payments -- and also has Smart Payment Buttons as an available option.

Postal Address validation in python

I just wanted to ask if your are writing a program in python and ask the user to input an email address, how can you validate it and make sure it is true?
address= input ("Please ente your postal address: ")
And then I would also need to repeat the question if the address is not true.
Beyond the basic format validation, this is usually done by sending an email to the provided address with a secret code and asking the user to enter the secret code in your program. For web apps the secret code is usually embedded in a link so the user does not have to type the code.
This doesn't exactly warranties that the email address "is true" because the email address can be temporary, but that's as close as you can get without hiring a private detective that looks into the private life of your user...
To check if the email address's domain name is valid (i.e., the part after #), you could use nslookup on *nix systems, call it in a Python subprocess.
You could also check the string you get against the official email Regex.
Put together; those two methods will tell you if the email is syntactically correct and with a valid domain. Which is often not enough...
To do full email validation, you're forced to use an external API that offers this service. A lot of email verifiers will pop up if you google for it.
Of course, the most robust way to go, and the only one that guarantees the email is valid AND is owned by the user, is to send a verification email with a link inside for your user to verify its email.

Generating an email with a QR code

I am trying to generate QR codes for each of my customers. Each QR code would create an email to me. I've researched and I am pretty sure that I understand how to best create emails with a specific subject and body filled in.
Create the mailto code/script/line that would create the email.
mailto:test#gmail.com?subject=Test%20Subject&body=This%20is%20a%20test.
Create a tinyurl out of the script, to create a more reliable QR code.
http://tinyurl.com/nry2xud
Make a QR code out of it with any standard website. I used http://www.mobile-barcodes.com/qr-code-generator.
This is all fine, but I want the QR codes to mask the sender's email address. I do not want to get an email from a personal email account that the customer has on their phone. I want to replace their email address with the company address that the specific customer works for.
Is this possible? Thank you for any help you can give.
By definition, mailto uses whatever mail client is configured in the user's browser, and sends from their own email address. (From the spec: "Originator fields like From ... when present in the URI, MUST be ignored.")
If you have a web server somewhere, a better solution would be to avoid mailto entirely. Instead, have the QR code direct the user to a page on your server. The server script for that page (written in, say, PHP) would send you the email. Then, it would also serve up a confirmation message to the user.

Resources