Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase User ID Allowed Characters

I am creating a key combining two Firebase user IDs, such as .

Would anyone know the character set of which Firebase User IDs are comprised of? Ideally, the delimiter should not be in the possible character set forming the Firebase user IDs.

(P.S.: Am planning on using underscore "_" or double underscore "__" as the delimiter).

like image 750
Raghav Bhagat Avatar asked Nov 22 '16 01:11

Raghav Bhagat


People also ask

How many characters are in Firebase UID?

The uid must be a non-empty string with at most 128 characters .

What is the length of Firebase UID?

The uid of type string is used to assign to the newly created user. Must be a string between 1 and 128 characters long, inclusive. If not provided, a random uid will be automatically generated.

How many characters in uid?

UIDs, shall not exceed 64 total characters, including the digits of each component, separators between components, and the NULL (00H) padding character if needed.

What is the length of the uid?

Examples of UIDs A Universal Unique Identifier (UUID) is a 128-bit number used to uniquely identify some object or entity on the Internet.


2 Answers

The auto generated latest version Firebase uids are alphanumeric with no dashes or underscores. The previous version of Firebase used uuid for uids. So those contained dashes. That said, if you are creating your own users via the admin sdk, you can specify dashes and underscores in the uids. Keep in mind, there is a limit of 128 characters for a uid.

like image 61
bojeil Avatar answered Oct 13 '22 07:10

bojeil


From my experience, the latest version of Firebase follows the ^[0-9a-zA-Z]{27}[0-9]$ pattern.

I don't know why there's always a digit at the end, but that seems to be consistent.

like image 21
Alix Axel Avatar answered Oct 13 '22 07:10

Alix Axel