i have scenario , looking solution that. working on application , using firebase create , authenticate user. in app, 2 types of users (1.user & 2. vender) , user can signin on app vender need login on web panel. using firebase default method (.createuser) create user , it's working. wants create vender profile in same app vender can login on web app , user can login on mobile app.
is possible ? if yes please guide me how it's possible ?
thanks in advance.
this open-ended question think comes down 2 things: determining user type (vendor or user) , detecting platform signing on.
both pretty easy.
heres's structure leverages /users node store additional info user. storing user data
users uid_0 name: "william: type: "vendor" uid_1 name: "leonard" type: "user"
and when user attempts log in, app checks user authentication, result authdata.uid being populated.
then user via authdata.uid , check user type. if it's vendor, display message user must log in via web portal, , don't proceed app.
there's 100 other ways handle - setting vendors node , users node app auth against having them select vendor or user before entering authentication credentials.
Comments
Post a Comment