File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ which takes care of token verification. In your settings.py:
17
17
18
18
AUTHENTICATION_BACKENDS = (
19
19
' oauth2_provider.backends.OAuth2Backend' ,
20
+ # Uncomment following if you want to access the admin
21
+ # 'django.contrib.auth.backends.ModelBackend'
20
22
' ...' ,
21
23
)
22
24
@@ -26,8 +28,9 @@ which takes care of token verification. In your settings.py:
26
28
' ...' ,
27
29
)
28
30
29
- You can use `django.contrib.auth.backends.ModelBackend ` along with the OAuth2 backend, but pay
30
- attention to the order in which Django processes authentication backends.
31
+ You will likely use the `django.contrib.auth.backends.ModelBackend ` along with the OAuth2 backend
32
+ (or you might not be able to log in into the admin), only pay attention to the order in which
33
+ Django processes authentication backends.
31
34
32
35
If you put the OAuth2 backend *after * the AuthenticationMiddleware and `request.user ` is valid,
33
36
the backend will do nothing; if `request.user ` is the Anonymous user it will try to authenticate
You can’t perform that action at this time.
0 commit comments