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

Can 2FA be bypassed for dev users in local development? #584

Closed
pacharanero opened this issue Oct 5, 2023 · 4 comments
Closed

Can 2FA be bypassed for dev users in local development? #584

pacharanero opened this issue Oct 5, 2023 · 4 comments

Comments

@pacharanero
Copy link
Member

I wondered if there woul dbe a way we could disable 2FA for local dev to reduce the time it takes to log in. Currently when setting up a new E12 dev env we have to create a 2FA method, set it up, and then use it to log in.

@anchit-chandran @eatyourpeas is this acceptable? I'm presuming we could use DEBUG=True or something to remove the 2FA requirement in local dev.

@eatyourpeas
Copy link
Member

eatyourpeas commented Oct 5, 2023 via email

@anchit-chandran
Copy link
Collaborator

yes I really really tried to bypass it for development because of the annoyance but was personally unable. The issue centers around the 2fa package we use hooks into the auth workflow. Potential solutions:

  1. (tried but couldn't get to work) - in development, the email with the code is logged to the console. Attempted to read this and pre-fill the code in the form so at least quicker to log in. However, for some reason it was saying the code being read in wasn't correct / the act of trying to read the code and pre-fill was flagged as suspicious.
  2. another idea I was thinking of - is there some way we can pre-inject session variables / state? could mean everything from login to 2fa is automatically done, and you're taken directly to the main organisation view

@anchit-chandran
Copy link
Collaborator

NOTE: someone has already raised an issue for this on the package (jazzband/django-two-factor-auth#676). Tried bumping it, we can check again at a later point

@dc2007git
Copy link
Contributor

dc2007git commented Feb 1, 2024

Closing this since added in PR #778

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants