Django Rest Framework Permissions with firebase auth


I have backend with django-rest-framework, and frontend with react. And I have one endpoint which returns all users list. I want only admin be able to see all users list, so I put permission_classes = [IsAdminUser] in my view. I tested it with browsable api and everything works fine. Authentication system is with firebase in frontend, so every time when I send get request to server it returns authentication credentials were not provided because I don’t use DRF endpoint to login, I use firebase login instead. So my question is how can I make only admin user see the data?

Source: React – Stack Overflow

September 4, 2021
Category : News
Tags: django | django-rest-framework | firebase | permissions | reactjs

Leave a Reply

Your email address will not be published. Required fields are marked *

Sitemap | Terms | Privacy | Cookies | Advertising

Senior Software Developer

Creator of @LzoMedia I am a backend software developer based in London who likes beautiful code and has an adherence to standards & love's open-source.