-
-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove django-allauth-2fa, dj-rest-auth and django-user-sessions #6293
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
…matmair/issue6281
…matmair/issue6281
src/frontend/src/pages/Index/Settings/AccountSettings/SecurityContent.tsx
Outdated
Show resolved
Hide resolved
Some notes: Login ConflictIf the user is already logged in, attempting a login causes a Ref: pennersr/django-allauth#4008 Registering TOTP CodeWhen you register a new code (in my case, scan QR into google authenticator) but you enter the incorrect one-time code, there is no feedback / error information supplied. The screenshot below shows this - the API returns an error but there is no UI feedback ![]() Login via TOTPIf you put the wrong code into the login screen there is no error message Note: I have pushed fixes for the missing error messages, not sure how to deal with the "already logged in" state though. |
Basic LoginBasic login (username / password) continues to work as expected (aside from the TOTP LoginAfter making some small tweaks (see my commits above) I now have TOTP working - seems to function as expected.
SSO... |
The 409 error is only a problem if running the frontend separately from the backend (ie with the vite dev server). In the production setup, the logged-in check at the beginning of the flow will catch that. |
I think all the mentioned issues should be addressed now, let me know if there is anything else that needs fixing. |
I'm really sorry, I won't have time currently for any review (that's why I answer so rarely). This is really a huge step for inventree to get rid of more old templating and a modernized login flow. Thank you really much for implementing this. |
@matmair thanks for adding that error message I don't have a way of testing SSO for this currently - have you tested this? Against which providers? |
@SchrodingersGat that is a database-locked error due to us running tests in parallel; this is normally fixed by just retrying a bit |
Would it be worth (as a separate PR) moving to a postgres setup for the playwright testing in CI? We spend a significant amount of time retrying failed tests... |
@SchrodingersGat any idea what this segmentation fault is? No idea how I introduced that |
This PR remove django-allauth-2fa and replaces it with the inline functions of django-allauth. This reduces the dependency footprint and eliminates a bunch of custom creations.
It also adapts the schema generation process to include all allauth endpoints (they do not use DRF so normal generation is not working).
Update: Most of the planned things we would be interested in are now implemented and the scope shifted a bit - it makes sense to just ripp all auth extensions out and use only allauths built-in things. We have a lot of grown auth-adjacent code that can probably be removed/rewritten.
Related Issues
TODO
Coverage
This relies on several upstream PRs: