auth works now

This commit is contained in:
2023-05-24 11:46:10 +03:00
parent bb225e5fb5
commit 4609ca23fa
8 changed files with 84 additions and 37 deletions

View File

@ -40,7 +40,8 @@ INSTALLED_APPS = [
'rest_framework.authtoken',
"rest_framework",
"snippets",
"custom_auth"
"custom_auth",
'rest_framework_simplejwt'
]
MIDDLEWARE = [
@ -136,3 +137,13 @@ AUTH_PASSWORD_VALIDATORS = {}
CORS_ALLOWED_ORIGINS = [
"*"
]
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_simplejwt.authentication.JWTAuthentication',
)
}
SIMPLE_JWT = {
"TOKEN_OBTAIN_SERIALIZER": "custom_auth.serializers.MyTokenObtainPairSerializer",
}