-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bypass 2FA Token in local development #82
Conversation
Signed-off-by: anchit-chandran <[email protected]>
Signed-off-by: anchit-chandran <[email protected]>
Signed-off-by: anchit-chandran <[email protected]>
Signed-off-by: anchit-chandran <[email protected]>
Signed-off-by: anchit-chandran <[email protected]>
Signed-off-by: anchit-chandran <[email protected]>
Signed-off-by: anchit-chandran <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Anchit for this nice piece of work. Looks all good.
One thing I have changed - would like to know whether you agree - is that I have removed the requirement to be both DEBUG and superuser to skip 2FA. My rationale is that 2FA is for production only, when DEBUG will be False, and I have found otherwise that if we are testing with different user accounts, it throws a 403.
Got working with help of @eatyourpeas thanks!
Overview
When in local development (
settings.DEBUG=True
), bypass the 2FA token step on login.This improves the developer experience.
Code changes
npda
app to only use 2FA / custom auth urlsLoginAndOTPRequired
andlogin_and_otp_required
mixin&decorator.post()
method of theRCPCHLoginView
class to skip past the normal auth workflow if in debug modeDocumentation changes (done or required as a result of this PR)
Related Issues
Mentions