wesleylima / django-rest-framework-firebase

Use Firebase to authenticate requests to your Django Rest Framework project
32 stars 14 forks source link

add the support of multi application configure #6

Closed jubeater closed 4 years ago

jubeater commented 5 years ago

HI, may i submit a pull request that add support for multi app support in your respository?

wesleylima commented 5 years ago

absolutely!

jubeater commented 5 years ago

cool,i will do it this week.

jubeater commented 5 years ago

Hi wesleylime, I am starting to add the multi app support part, but i am stuck at how to add the multi app configure. I have some ideas:

  1. add fixed slot multi configure in setting.py, it easy to configure but seems not flexible.
  2. add a function that can read a configure json file then init the related firebase app in the authenicate part.

Another part is how to authenicate with firebase with multi app. I'm thinking is to guide the user using the app name replace the which is "jwt" by default now.

Do u have any better ideas?

wesleylima commented 5 years ago

I don't think I understood what you're trying to do. You're wanting to adapt this module so that multiple Firebase apps can use the same Django application?

jubeater commented 5 years ago

I don't think I understood what you're trying to do. You're wanting to adapt this module so that multiple Firebase apps can use the same Django application?

yes, That's exactly what i want to do.

wesleylima commented 5 years ago

Sorry for the delayed response. You would have to provide and load a firebase configuration for each firebase app. I'm not sure the firebase-admin package supports that so that would require either adding support for multiple configs in firebase-admin, or re-implementing the auth functionality within this package. If this is something you're interested in doing I'll leave this issue open pending a pull request. Otherwise I'll mark it as closed. Thanks for the interest!