Firebase User ID Allowed Characters

独自空忆成欢 提交于 2019-12-10 10:38:53

问题


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).


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/40732330/firebase-user-id-allowed-characters

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!