-
Notifications
You must be signed in to change notification settings - Fork 2
Adding 2FA module #320
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
base: develop
Are you sure you want to change the base?
Adding 2FA module #320
Conversation
| return {"success": False, "message": str(e)} | ||
|
|
||
|
|
||
| def get_user_secret(request, user_name: str): |
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.
@GonzaloMrBot este tipo de cosas habíamos conversado de que era mejor tenerlo como properties en el modelo para que todo se mantenga más centralizado y usar menos líneas de código, por ahora se pueden quedar así pero en el futuro es mejor usar property, classmethod y staticmethod para estas cosas, igual para lo que hay en one_time_code
|
|
||
| def update_user_secret( | ||
| request, user_name: str, new_secret: str = None, new_two_fa_method: str = None | ||
| ): |
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.
muy bien usar el type hint en los métodos, en el futuro puede poner también el type del return para que sea aún mas claro y el type del request
climmob/utility/send_otp_email.py
Outdated
|
|
||
| def send_email( | ||
| subject, body, email_to, email_from, smtp_server, smtp_user, smtp_password | ||
| ): |
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.
voy a hacer una tarea nueva para hacer una sola clase para enviar correos y que se use en todos los lugares que se envian correos, como RecoverPasswordView.
climmob/views/configure_2fa_view.py
Outdated
| messages = [] | ||
| otp_qr_code = None | ||
| one_time_codes = [] | ||
| # Tomar datos de user |
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.
hay comentarios en el código en inglés y español. Creo que lo mejor es que todos los comentarios estén en inglés. @BrandonMrBot que opinas?
Por favor, revisar la distribución del código y dejar anotadas las observaciones acá en la plataforma para no olvidarlas, aún faltan detalles pero se esta trabajando en ellos.
Recuerden no hacer Merge por favor, se deben quitar los revision de alembic.