authentication

How to solve for authentication error in Python

How to solve for authentication error in Python Question: I am trying to authenticate the user while running a code in python, but running into an error, "422 Unprocessable Entity". The code is running fine without the authentication, but I am unable to pass request. from typing import Union import requests import uvicorn from auth …

Total answers: 2

Extend social pipeline and prevent a specific function to run during tests

Extend social pipeline and prevent a specific function to run during tests Question: I’m using Python Django Social Auth and extended the pipeline with the following three steps One before the user is created (partial pipeline) requesting some data. One for the user creation (overrides the social.pipeline.user.create_user method). One after the user is created. Here’s …

Total answers: 1

Verifying username and password input through flask python

Verifying username and password input through flask python Question: My project requires I read and write input username and password to a text file (not db or json). From there when the user logs in, I need to verify that the username and password match. I have encrypted the password using sha256. Every time I …

Total answers: 1

how to add a profile object by using objects.create method

how to add a profile object by using objects.create method Question: simply my error is this Exception has occurred: TypeError User() got an unexpected keyword argument ‘User’ here is the data I receive from the post request in view.py if request.method == "POST": student_surname = request.POST.get(‘student_surname’) student_initials = request.POST.get(‘student_initials’) student_birthday = request.POST.get(‘student_birthday’) student_username = request.POST.get(‘student_username’) …

Total answers: 1

Django login/ payload visible in plaintext in Chrome DevTools

Django login/ payload visible in plaintext in Chrome DevTools Question: This is weird. I have created login functions so many times but never noticed this thing. When we provide a username and password in a form and submit it, and it goes to the server-side as a Payload like this, I can see the data …

Total answers: 1

mysql.connector.errors.NotSupportedError: Authentication plugin 'mysql_native_password' is not supported only with pyinstaller exe

mysql.connector.errors.NotSupportedError: Authentication plugin 'mysql_native_password' is not supported only with pyinstaller exe Question: I am fighting to find a solution for my problem: When I start my Python application in my IDE, the database connection is working fine. But when I build an exe with pyinstaller with the following command python3 -m PyInstaller .home.py and start …

Total answers: 3

Is it secure to log in a user without a password?

Is it secure to log in a user without a password? Question: I am thinking of logging a user in to my Django website by verifying the email rather than them having to write a password. If this is not clear, this is what I’m thinking: User enters email User gets a email containing a …

Total answers: 2

About Microsoft turning off IMAP protocol communication. When I use imaplib in python I get this error: b'LOGIN failed'

About Microsoft turning off IMAP protocol communication. When I use imaplib in python I get this error: b'LOGIN failed' Question: My sample code block; import imaplib try: userName = "[email protected]" passwd = "***" SMTP = "outlook.office365.com" Port = "993" imapSession = imaplib.IMAP4_SSL(SMTP, Port) imapSession.login(userName, passwd) except Exception as e: print(e) Return: error: b’LOGIN failed.’ I’m …

Total answers: 1

Python: How do I check if login and password int exist in a txt file?

Python: How do I check if login and password int exist in a txt file? Question: I am trying to build a basic login system in Python. I am saving the username and password inputs to a text file, but I am unsure how to most effectively validate them upon calling the login function. How …

Total answers: 1

why can't it not find this cookie?

why can't it not find this cookie? Question: I want to scrape this website: https://dbh.smartschool.be/ for a school project but I always run into a problem whit the authentication and I have no cleu why. this is my code: import requests URL = "https://dbh.smartschool.be" LOGIN_ROUTE = "/login" HEADERS = { "User-Agent" : "Mozilla/5.0 (Windows NT …

Total answers: 1