Unable to reset password in Django - django

I have an app which allows the user to reset password. I user the django authentification system but everytime I want to send an email I get the error ' 535, b'5.7.8 Username and Password not accepted. '.
I have already generated and app password and replace the password in my "settings.py" but I still get this error.

have you
tried sending passwords with a separate python script or application like the REST Client in VSC to assure the credentials are working? At least when using gmail I know you have to adapt the security settings in the gmail account used.
checked e.g. by using print statements (ONYL in you dev environment!) that the credentials are available as expected?

Related

Sending email with Django using Gmail not working

I'm new to Django and I want to send the email through my Django server using my Gmail account but unfortunately, I'm getting an error while sending emails even though I've put all credentials correctly there is one thing more in my Gmail account which is "less secure apps" that has to be enabled but this feature is no longer available in Gmail so now how can I send the emails in Django?
error while sending the email
b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials f14-20020a05600c4e8e00b0039c5642e430sm4688852wmq.20 - gsmtp'
Since May 30 2022 the less secure apps feature has been disabled. Now, to let 3rd party apps access gmail you must generate an App password and to generate an app password you must first enable 2-factor authentication for your account:
https://myaccount.google.com/apppasswords
Once you have the app password you can simply replace your host account password with the app password:
EMAIL_HOST_PASSWORD = '<app_password>'
You can find the complete email integration process wonderfully explained here: https://github.com/CoreyMSchafer/code_snippets/tree/master/Django_Blog/12-Password-Reset/django_project
im looking forward for an answer too, as i am experiencing the same problem.
In the meantime, i had to change the email provider to another company, for me it worked with mailjet, they have a free plan and no card info needed, hope this helps you!

Aws Cognoto One time password Testing using Cypress?

The way I'm logging in to my app is by entering a username and then aws amplify generates and send the one-time password to the registered email address of the user and then the user is asked to enter the one-time password.
What I want is to test my scenario automatically.
Searched a lot but what I git is a simple username and password login using the Cognito strategy of the cypress.
Any help is appreciated.

Google Compute engine WHM root password

I am updating my password using the sudo passwd command in the SSL.
It tells me I have changed the root password but when I try to login I get "The login is invalid."
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Any ideas as to why this is not updating? (I am currently unable to login to WHM until this password updates).
Turns out I was using the wrong password originally. When I came to try the correct password it was still telling me I had the wrong details.
By the time I came to reset the password the server had blacklisted my IP (Too many attempts).
The solution was to remove the IP ban and everything was working fine again.
(Huge thanks to the cPanel Support team for helping me find the issue!!)

Email send using app password - Username and Password not accepted?

I can't figure out why I can't send email in Django.
I've enabled 2-step verification and generated App Password for this connection.
But Gmail smtp returns:
SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted. Learn more at\n5.7.8 https://support.google.com/mail/?p=BadCredentials q29sm16257362qtc.10 - gsmtp')
I thought that using App Password will not cause such errors.
EDIT:
The email uses a custom domain but I guess this is not a problem. I think that smtp.gmail.com should work.
I haven't allowed less secured apps since I think it is not needed with App Password.
I had the same problem with two-factor authentication and allowed less secured apps. It is necessary to use App password ! there is still one last feature to activate: https://accounts.google.com/DisplayUnlockCaptcha
If you have a Gsuite domain click on this link : https://admin.google.com/ac/security/lsa and "Allow users to manage their access to less secure applications"

Logging into PHPMYADMIN

My website runs off of an AWS server. I went to login to phpmyadmin and placed in the username and password that matches the username and password in config.inc.php and I get the error:
The user name or password you entered for this area on ___________:80 was incorrect
Any suggestions on how I can fix this?
phpMyAdmin doesn't have user accounts, when you enter your credentials in the login field those are passed on directly to MySQL (more information).
The only time you should need to have your username and password in config.inc.php is if you're using the "config" auth_type, in which case you aren't prompted at all when logging in.
But the thing is, that doesn't sound like a phpMyAdmin error message. Perhaps you have some other means in place of protecting your phpMyAdmin installation, such as a .htaccess file or Apache configuration directives.
I suggest starting with the command line client, see if you can log in with the username and password you have. Next, look at the phpMyAdmin configuration, config.inc.php, and for testing purposes I suggest you use auth_type cookie. That way, if you get a popup login dialog you know something else is restricting you. With auth_type cookie, phpMyAdmin displays the username and password fields on a web page form rather than a popup dialog. Finally, check your webserver error log for any hints; it might log more information about where this authentication is configured.