Hi Folks! Hope you're all having a blast building apps on Firebase.
The format of the auth UIDs generated by Firebase will be changing on Monday, August 17th. We’ll be changing from an incremental integer to a UUID (universally unique identifier).
This will affect the email/password and anonymous providers on the 17th, and be extended to the OAuth providers (i.e. GitHub, Facebook, Twitter, and Google) at some undetermined time in the future. If you’re manipulating or parsing UIDs in any way, you’ll want to update your code and security rules before the 17th.
When new users get created after this date, you may notice that, instead of a string like <provider>:<number>, new accounts will have a UID assigned that looks more like f47ac10b-58cc-4372-a567-0e02b2c3d479. You should keep in mind that the contents of these strings are an implementation detail and not intended to be meaningful. They are only guaranteed to be unique and unchanging for a given user.
To reiterate, this will affect new UIDs created with createUser(), but will not affect any of your existing users’ UIDs.
Below is a quick checklist to ensure your code won't be affected by this change. If you have additional questions, reply here or reach out to sup...@firebase.com.
If you are checking auth.uid begins with, contains, or doing any sort of matching on the contents of this string, this will break. Particularly, if you are doing a replace on ‘:’, this will almost certainly break.
Alternatives: Use auth.provider to obtain the provider name. If you need to access the OAuth id (e.g. facebook ID) then you can programmatically store this in your data when a user authenticates (e.g. authData.facebook.id where authData is the return value from any authWith*() call).
The length of new UID strings may be radically different than existing UIDs created before this change. If you are checking to ensure the length is greater than zero, that should continue to work, or could simply be replaced by a boolean (e.g. “.read”: “auth.uid”).
If you are checking that the auth.uid matches another value stored in the data, this should continue to work perfectly. Existing users’ UIDs will not change and newly minted UIDs will have a different format, but still work with this approach.
If you want to test your existing code against the new format, this gist illustrates how to create a mock authentication token that will resemble the new UUID strings.
Have a great day,
Kato
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CADypTEaj-NDiV3_Zpr-9_9W_OfqboS1a%3D5G4wqCApf%2B_Hr87uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CANF_M5xi-c1p2yeKr%2BCvORMmhOMbL6ta%3Dp1qfRoNX9Szo4u7ww%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CADypTEbCgwkYAM4_FJ%2BXE6ZiLoBDGVL-BtrqMo9NVGha_MGF1Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CE7CF13F-736E-4DC4-8AC0-9D2ADC331052%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/d92d2f5a-82e7-4fa0-91ed-02ceef1fed80%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAGcMwsAG8miYhLdkgaAn1o4nOwCBs7VZ%2Bdvoy59-gD4amoE-kQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CANF_M5yU4OXp9f2Ce4DWARgnoScX%2Bi8RrLibhd-LR3gGyHRS1Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/4ce7b7e8-460d-4f6c-a24b-420ba7453376%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f50e6490-0568-4d0b-b406-1f810a86d195%40googlegroups.com.
We're using the user.uid from Google as keys for children of a 'users' node. Thus 'google:56532...' Even if we can continue to use user.uid as a key, will the values for each user change forcing us to re-register our users?
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/7e831e36-16e1-4b29-a53c-09d1f298c3ad%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/b3ba4a11-9081-4767-bb0d-bfb6a50bd9d6%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CADypTEZxDdvpiUH57RSiL2BXwOxqjSBifnwVh0ZjX43gPKVY5Q%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/1cb736d1-d327-4ad3-ac51-1ea4ff1db726%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CADypTEY-HzPM9Yhoa8xefk9T5U5Bv%3D68LA_qf88jg5wkCWkfFA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAPUi1p1E5i4jX%3DJXSzNybFOXuX%3D64Z8_6HwK8QcgJi0sWPqrdw%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/848c0c2d-c8d9-4ce8-aba0-b6edf0f8a020%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAGcMwsAe9XWYgJyjZJddoy43w1smV_soTX1v2JnodYkkqp%2B-6A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAPUi1p3FMUKxA2RemVmDsdJ0_%3DS6AqtpcxTKiezLFXQ0mBouGA%40mail.gmail.com.
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/e8f2d169-b339-4295-a9d6-434ef69c3a77%40googlegroups.com.