feat(backend): migrate auth and notifications off email
This commit is contained in:
@@ -19,7 +19,6 @@ class JWTAuth(HttpBearer):
|
||||
if user_id:
|
||||
user = User.objects.get(
|
||||
id=user_id,
|
||||
is_email_verified=True,
|
||||
is_active=True,
|
||||
)
|
||||
return user
|
||||
@@ -32,6 +31,7 @@ def create_jwt_token(user):
|
||||
payload = {
|
||||
"user_id": user.id,
|
||||
"email": user.email,
|
||||
"mobile": user.mobile,
|
||||
"exp": datetime.now(UTC) + timedelta(seconds=settings.JWT_ACCESS_TOKEN_LIFETIME),
|
||||
"iat": datetime.now(UTC),
|
||||
}
|
||||
@@ -49,4 +49,3 @@ def create_refresh_token(user):
|
||||
|
||||
|
||||
jwt_auth = JWTAuth()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user