1,917 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
49
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
60
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
61
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
44
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
32
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
40
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 ...
1
vote
1
answer
96
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
121
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
130
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
143
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
114
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....
-1
votes
1
answer
281
views
AADSTS50011: The redirect URI 'http://127.0.0.1:8000/oauth2/callback' specified in the request does not match the redirect URIs
Message: AADSTS50011: The redirect URI 'http://127.0.0.1:8000/oauth2/callback' specified in the request does not match the redirect URIs configured for the application '456b3ef5-cdbe-4d58-aa7b-...
3
votes
2
answers
358
views
How to get current user in save method of a django model?
I have the following django model:
class Listing(models.Model):
STATUS_CHOICES = [
('available', 'Available'),
('rented', 'Rented'),
('unavailable', 'Unavailable'),
...