Unique user id - User1, User2, User3 .... on Firebase

howto

#1

How to get unique id on Firebase like User1, User2, User3 … & so on… every time user signup to our app… ? any block idea?


#2

do you want it for login?


#3

No, i want this as bucket … so every unique bucket for unique users data…hope you get that…


#4

yup
yup i understand.
i think you can add username to listAllUserNames.
jenny(member 4) --> jack(member3), john(member2), jackson(member 1)
after that get the index(index 4) of username from the listAllUserNames
and create the bucket username and index from ListallUserNames.
so its jenny4 (bucket)


#5

Sorry i’m new …i didn’t get that… can u please share blocks, if u can?


#6

ok let me tell you its litte bit complicated.and usually i dont make blocks like what you says.it depends project.
i will show register block.it was one of my project i changed it litte for you.


#7

This will generate a unique bucket for every device.


Add data in firebase tag
#8

quite complicated for me, let me try …:rofl:


#9

ok be careful.if the user change device something.you must think well.


#10

owh…thank u so much :slight_smile:


#11

I can’t find that extention…where to get that?


#12

Under Social category.
Be advice “This will generate a unique bucket for every device.”

If you don’t know your users I’d suggest you to use Firebase Authentication V.3.0
This will prevent duplicated username signup.


#13

I didn’t tried it but for every user what unique is their email id. So, why not to use it. And you can remove the “@” symbol or replace it with any alphabet/s if it don’t work with @ symbol.


#14

Hey thanks… I will definitely try this too …:grinning:


#15

Yeah, it would be better option…