-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEAT]: JWT Authentication on backend #9
Comments
I would like to work on this issue. Kindly assign this to me. |
I am currently facing issue while making the migrations after adding a dummy model, it is because of the conflicting the name of the app which is
The solution was to change the name of the app from |
yeah it's fine @SharonIV0x86 |
I currently have this User model created with the following fields and the serializer. I am requesting some reviews on it. class User(models.Model):
age = models.IntegerField()
firstName = models.CharField(max_length=30)
lastName = models.CharField(max_length=30)
email = models.CharField(max_length=40, unique=True)
password = models.CharField(max_length=40)
role = models.CharField(max_length=12) And the class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = "__all__" #serializing all fields
#fields = ['password', 'email'] #serializing some fields Suggest any addition or changes to them. |
You don't have to create a new User model. Django already handles those internally. |
Requirements
Create a new django app (not project, see this) called
auth
which has these endpoints -/auth/register
- User can create an accountemail, password, confirm_password, full_name
status, message, access_token, refresh_token
/auth/login
- User can login to their accountemail, password
status, message, access_token, refresh_token
/auth/logout
- User can logout of their accountnothing
Authorization: Bearer <access_token>
status, message
/auth/refresh
- User can refresh theiraccess_token
refresh_token
status, message, access_token
Resources
The text was updated successfully, but these errors were encountered: