Change Proposal on TokenAuthentication #7938
Unanswered
quertenmont
asked this question in
Ideas & Suggestions
Replies: 2 comments
-
I think you've missed the point of the This attribute makes things easy for us when inheriting the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Not really. Loic |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I propose a switch of logic regarding the TokenAuthentication class.
Today the authentication is done by getting the token with a select_related on the user.
This current approach is different from other authentication scheme, where the get is done on the user and credentical are checked in a second step.
The issue with the current approach is that you can't define "select_related" or other customization on the UserModel default manager. So I would propose to swap the logic to make the get on the user model itself and joined on the token table.
Today:
My Proposal:
That's quite a minor change but it allows to improve the performance on joined user tables (typically on the user profile table)
Beta Was this translation helpful? Give feedback.
All reactions