0

My project is to create an app similar to Uber.

There are 2 APPs, one for partners and the other for clients and I saw that I can create more than one app within the same Firebase project,that way I can use the same database for both APPs.

What I did not understand, how to do is differentiate the partners and the clients?

In the "Auth" menu, I would have to differentiate them with a Boolean.

Can I do this using Firebase? If not, does anyone know show me another way to do? or another database?

Another question I have is in relation to part of the payment, How I store the data of the credit card at Firebase? It support for this? Does anyone know show me a library to make payments straight through the app?

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Victor Mendes
  • 179
  • 20
  • 2
    Just a recommendation, keep posts to one question each. No reason you can't post two questions on the same day – Neal Davis Sep 05 '16 at 03:28

1 Answers1

1

I don't think you can do that from the "Auth" Menu. This "Auth" function is only there for the sole purpose of letting user signup and login to your app.

You just need to implement the user category in your Real time database. Store the user's uID, with key:value "userType":"client" or "userType":"partner".

And whenever the associated uID logs into your app succesfully. you need to read from the Real Time database to determine whether this user is a "client" or "partner" and show the appropriate functionality accordingly (or direct them to a different View controller eg: ClientViewController / PartnerViewController). Or if you have 2 entirely separate apps. Then this can act as a verification, just to make sure if this user is indeed a partner / client.

I'm not sure what to do with the payment system. But you can look at library like Braintree or something.

Tommy
  • 979
  • 8
  • 15