1,919 questions
0
votes
0
answers
17
views
Django Allauth Google OAuth: MultipleObjectsReturned even though no duplicates in MySQL
I’m using Django + MySQL with django-allauth and Google OAuth.
Login fails with this error:
MultipleObjectsReturned: get() returned more than one SocialAccount
The confusing part is that the database ...
1
vote
0
answers
47
views
Function to Password recovery email only works on localhost in django
I have the code below that is responsible for sending a password recovery email to the user who made the request. However, it only works, that is, only sending the email on localhost if the user ...
1
vote
1
answer
57
views
@login_required depending on setting?
While I expected this to be answered somewhere on StackOverflow, I haven't found it, so I apologise if this is a dupe.
I want a setting to control whether certain views require a user to be logged in. ...
0
votes
1
answer
59
views
Azure AD Authentication with Django on AWS ALB: Redirect URI problem
I am trying to integrate Microsoft authentication with my Django app using the django_auth_adfs package. However, I encountered an error regarding a mismatch in the redirect URI.
I have followed the ...
1
vote
1
answer
27
views
Django DRF showing weired auth methode respective to URL
I'm facing a strange issue with Django REST Framework (DRF).
# views.py
class CheckoutView(APIView):
permission_classes = [AllowAny]
def post(self, request, *args, **kwargs):
...
0
votes
0
answers
40
views
CSRF Token Failure and 404 not found
I am developing a React app with Django REST Framework as backend and hosting both on Heroku. When registering or logging in via the frontend, I get a 404 Not Found error for the CSRF token endpoint:
...
0
votes
0
answers
31
views
Django can't display html box of authentifiation
I have the problem that the google auth is not working properly. When I try access the site, then I get the error <a href="{% provider_login_url 'google' %}?next=/">Login with google&...
1
vote
1
answer
39
views
How fix redirect after registration? Django
today I faced such a problem that after registration the form does not go anywhere. The catch is that the form does not send a request to the database, but I can create a user through the Django admin ...
0
votes
0
answers
60
views
SSL: CERTIFICATE_VERIFY_FAILED when submitting forms in Django run on Windows VPS with Apache web server [duplicate]
I have a Django website hosted on a VPS (OS Windows server 2019). The web server is Apache 2.4 and Python version is 3.12.8. A Digicert SSL certificate successfully installed and the website is ...
1
vote
1
answer
92
views
Override the accounts/login/ in Django
So I'm using django.contrib.auth.urls and I would prefer to continue that.
But I want the accounts/login url to be replaced with users/c-login or whatever.
I would really like to understand why this ...
0
votes
1
answer
56
views
Django - Failed Login Redirecting To Different Page
I am new to Django and I am trying to use the authentication system. I have managed to get it working using the default Auth URLS. (/accounts/login) etc.
I want to get a login form on my homepage so ...
0
votes
1
answer
114
views
Django logout template not working even with POST
This is my logged_out.html
{% extends 'base.html' %}
{% block title %}
Logout
{% endblock %}
{% block content %}
<form action="{% url 'login' %}", method="POST">
{% ...
0
votes
2
answers
124
views
Django returns "Authentication credentials were not provided" when I attempt token authentication
(I tried the solutions in similar questions, but they didn't work for me).
I am creating a simple Django REST based web-app, where a user will register, create some events, log in later and view ...
1
vote
2
answers
138
views
Django Rest Framework TokenAuthentication not working "Invalid Token"
I'm successfully creating a token upon a user's login (using a CustomUser model that replaces the username field with email), but when using this token in subsequent requests, the response is "...
1
vote
1
answer
112
views
django authentication backend being ignored when specified
I have a two customer authentication backends: one for a standard login, and one for a two factor login.
In my settings.py, I have them both listed
AUTHENTICATION_BACKENDS = [
'user_profile....