0
votes

I'm using django-rest-framework to create a api for my Front-end, but now i having problem with the authentication, i can't find some guide to do this.

Can i use angular in my Front-end to authenticate my users that are already in my django User model.

2

2 Answers

0
votes

My suggestion is to use Django's backend authentication system.

You can create one middle ware to check user's authentication for token from db (Token table) or Session (Authenticated User). It depends on you which authentication system you want to use.

If user is not authenticated then redirect them to login url.

0
votes

I know this is too late to answer this question but recently I have created my first Angular 7 based project with Django 2.1 which actually helped me understanding "how to use Angular".

The project uses django-rest-auth ( you can check the documentation where they mention about customizing the User Model ) and django-rest-framework-jwt for authentication using jwt.