-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathurls.py
More file actions
56 lines (52 loc) · 1.88 KB
/
urls.py
File metadata and controls
56 lines (52 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from django.urls import path
from apps.accounts.views import (
CallbackHandleView,
GoogleHandle,
OTPVerificationCheckView,
ResetPasswordOtpVerifyView,
SendPasswordResetOTPView,
UserChangePasswordOTPView,
UserChangePasswordView,
UserLoginView,
UserLogOutView,
UserPasswordResetView,
UserProfileView,
UserRegistrationView, CreateAdminUserView,
)
app_name = "apps.accounts"
from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView
urlpatterns = [
# Generate Access Token using Refresh Token
path("token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
path("token/verify/", TokenVerifyView.as_view(), name="token_verify"),
path("register/", UserRegistrationView.as_view(), name="register"),
path("otp/verify/", OTPVerificationCheckView.as_view(), name="verify_otp"),
path("login/", UserLoginView.as_view(), name="login"),
path("profile/", UserProfileView.as_view(), name="profile"),
path("logout/", UserLogOutView.as_view(), name="logout"),
path(
"forget-password/",
SendPasswordResetOTPView.as_view(),
name="send-reset-password-otp",
),
path(
"forget-password/verify/",
ResetPasswordOtpVerifyView.as_view(),
name="verify-reset-password-otp",
),
path(
"reset-password/",
UserPasswordResetView.as_view(),
name="reset-password",
),
path("changepassword/", UserChangePasswordView.as_view(), name="changepassword"),
path(
"changepassword/otp/verify/",
UserChangePasswordOTPView.as_view(),
name="changepassword_otp_verify",
),
# google oauth endpoints
path("google/login/", GoogleHandle.as_view(), name="google"),
path("google/login/callback/", CallbackHandleView.as_view(), name="callback"),
path('create-admin', CreateAdminUserView.as_view(), name='create-admin'),
]