Skip to content
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

Draft
wants to merge 161 commits into
base: master
Choose a base branch
from

Conversation

matmair
Copy link
Member

@matmair matmair commented Jan 19, 2024

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.

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

  • refactor authentication forms && detection of enabled features (see 8912)
  • implement custom link target lookup for email from django-allauth
  • show user ID in MFA flow
  • implement email verification flow
  • re-implement registration flow
  • re-implement password reset flow
  • re-implement password change
  • keep auth context somewhere for the local session to refer back to
  • move now removed system status info into main status (registration, mfa, sso available)
  • switch back to browser flow for auth APIs
  • rename all new auth URLs to fix to the current schema
  • include schema for auth with central API
  • write changelog

Coverage

This relies on several upstream PRs:

Copy link

netlify bot commented Jan 19, 2024

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit d6417a8
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/67a15cc309b1b200086786c6
😎 Deploy Preview https://deploy-preview-6293--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 92 (🔴 down 8 from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@matmair matmair added dependency Relates to a project dependency security Relates to a security issue breaking Indicates a major update or change which breaks compatibility labels Jan 19, 2024
@matmair matmair self-assigned this Jan 19, 2024
@matmair matmair added this to the 0.14.0 milestone Jan 19, 2024
@matmair matmair modified the milestones: 0.14.0, 0.13.6, 0.15.0 Feb 12, 2024
@matmair
Copy link
Member Author

matmair commented Jan 20, 2025

This is done as far as possible right now; I am waiting on upstream to merge a few PRs so that this can get merged.
I would appreciate reviews, this should work in dev mode with the API being available on http://localhost:8000 (a PR to upstream needs to be merged to fix that limitation)

@matmair
Copy link
Member Author

matmair commented Jan 26, 2025

Upstream has merged what we need; this can be released after 0.65.4 is released;
before this is merged 00bb6c5 needs to be reverted

@SchrodingersGat
Copy link
Member

Upstream has merged what we need; this can be released after 0.65.4 is released;

Do you mean upstream for django-allauth?

@matmair
Copy link
Member Author

matmair commented Jan 27, 2025

@SchrodingersGat yes

@SchrodingersGat
Copy link
Member

@matmair I indend to get to this soon to review and test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Indicates a major update or change which breaks compatibility dependency Relates to a project dependency full-run Always do a full QC CI run security Relates to a security issue
Projects
None yet
3 participants