You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2. Set which types of contact points are allowed for auth in your Settings.py. The available options are `EMAIL` and `MOBILE`.
52
50
53
51
PASSWORDLESS_AUTH = {
54
-
//…
55
-
‘PASSWORDLESS_AUTH_TYPES’: [‘EMAIL’, ‘MOBILE’],
56
-
//…
52
+
//…
53
+
‘PASSWORDLESS_AUTH_TYPES’: [‘EMAIL’, ‘MOBILE’],
54
+
//…
57
55
}
58
56
59
57
3. Add `drfpasswordless.urls` to your urls.py
60
58
61
59
urlpatterns = [
62
-
//..
63
-
url(r'^', include('drfpasswordless.urls')),
64
-
//..
60
+
//..
61
+
url(r'^', include('drfpasswordless.urls')),
62
+
//..
65
63
]
66
64
67
65
4. Add an email or mobile number field to your User model. By default drfpasswordless looks for fields named `email` or `mobile` on the User model. If an alias provided doesn’t belong to any given user, a new user is created.
@@ -133,46 +131,46 @@ This can be turned off with the `PASSWORDLESS_REGISTER_NEW_USERS` setting.
133
131
Here’s a full list of the configurable defaults.
134
132
135
133
DEFAULTS = {
136
-
# Allowed auth types, can be EMAIL, MOBILE, or both.
137
-
'PASSWORDLESS_AUTH_TYPES': ['EMAIL'],
134
+
# Allowed auth types, can be EMAIL, MOBILE, or both.
135
+
'PASSWORDLESS_AUTH_TYPES': ['EMAIL'],
138
136
139
-
# Amount of time that tokens last, in seconds
140
-
'PASSWORDLESS_TOKEN_EXPIRE_TIME': 15 * 60,
137
+
# Amount of time that tokens last, in seconds
138
+
'PASSWORDLESS_TOKEN_EXPIRE_TIME': 15 * 60,
141
139
142
-
# The user's email field name
143
-
'PASSWORDLESS_USER_EMAIL_FIELD_NAME': 'email',
140
+
# The user's email field name
141
+
'PASSWORDLESS_USER_EMAIL_FIELD_NAME': 'email',
144
142
145
-
# The user's mobile field name
146
-
'PASSWORDLESS_USER_MOBILE_FIELD_NAME': 'mobile',
143
+
# The user's mobile field name
144
+
'PASSWORDLESS_USER_MOBILE_FIELD_NAME': 'mobile',
147
145
148
-
# Marks itself as verified the first time a user completes auth via token.
149
-
# Automatically unmarks itself if email is changed.
0 commit comments