Max Length of autogenerated ID, and avoiding collisions with custom generated ID

30 views
Skip to first unread message

George Bittmann

unread,
Jul 27, 2016, 12:38:49 PM7/27/16
to Google Identity Toolkit
It looks like the ID returned by getUserId() is typically 28 characters. What is the max length?

What is the best practice for avoiding collisions with the ID value if you need to use uploadUsers() to create users?

Jin Liu

unread,
Jul 27, 2016, 3:25:19 PM7/27/16
to Google Identity Toolkit
Hi George,

The auto generated user ID length could be increased in future, but you can safely assume it will not exceed 256 bytes.

If your existing user ID length is less than 25 characters, then there will no be collisions with auto generated IDs. You may also insert a prefix (e.g. 'my-app-') to the user id when uploading users.

Jin
Reply all
Reply to author
Forward
0 new messages