open-source-ideas / ideas

💡 Looking for inspiration for your next open source project? Or perhaps you've got a brilliant idea you can't wait to share with others? Open Source Ideas is a community built specifically for this! 👋
6.57k stars 221 forks source link

Firebase support for django - authentication, firestore and cloud functions #232

Open binoyudayan opened 4 years ago

binoyudayan commented 4 years ago

Project description

The idea is to use firebase cloud services for the website. As far as I know, the basic idea of firebase is server less deployment. I run into a situation where I need to use firebase and django together. I have implemented authentication using firebase admin and firebase-webui.. At the moment I have the following things, it can be updated

  1. Deploy authentication as an open source ( if you think its useful for somebody)
    • Login using firebase/google id token, manage the sessions
    • Handle user permissions - create user object like django auth user from firebase authentication and users document(where additional user information and permissions are saved). Use this user object for different permission mixins and context processing for user and permissions
  2. Make something similar to django Model and Manager to abstract firestore Documents and Collections(can be additional methods to existing classes in firebase admin package). Since firestore is a non relational database, we can't define all the fields in advance. But in situations like,
    • the mandatory fields with defaults values can be defined
    • document field types can be validated
    • It might be useful for form field validation
    • field value access using attributes instead of dictionary key
  3. Handle firebase cloud function calls
    • Function call, authentication, response/error handling for end user

Relevant Technology

Python, django and firebase

Complexity and required time

Complexity

Required time (ETA)

Categories

FredrikAugust commented 4 years ago

Could you please fix the checkboxes? Thanks.

FredrikAugust commented 4 years ago

Also, how does this fall under "Security"? I understand that security is important to the application, but from what I gathered, it's not the focus of the idea.

binoyudayan commented 4 years ago

Yes, it's not the focus of the idea. I have kept 'security' as the application has to handles authentication and user sessions without any flaws. If you think, we can't keep security, I'll remove it.