Skip to content
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

Allow password reset without being authenticated #148

Merged
merged 1 commit into from
Sep 8, 2022

Conversation

nittolese
Copy link
Contributor

Problem

Only authenticated users can request a password reset, as described here: #67

Solution

Adding authentication_classes to views.

@nittolese
Copy link
Contributor Author

Hey @nezhar , any update on this?
Can I ask why you need to be logged in to request a reset password? Seems non-sense to me!

Thank you!

@nezhar
Copy link
Member

nezhar commented Sep 6, 2022

Hi @nittolese,

Thanks for your contribution and sorry it took so long. Of course you don't need to be authenticated 😄

There are no permission_classes defined, so I can only asume some custom authentication_classes lead to this behavior. Can you maybe provide your definition of DEFAULT_AUTHENTICATION_CLASSES so I may try to reproduce this also in a test case.

@nezhar nezhar self-assigned this Sep 6, 2022
@nittolese
Copy link
Contributor Author

Hey @nezhar ,
Here is my default authentication classes in settings.py

"DEFAULT_AUTHENTICATION_CLASSES": (
    "rest_framework.authentication.SessionAuthentication",
    "rest_framework.authentication.BasicAuthentication",
    "rest_framework.authentication.TokenAuthentication",
    "rest_framework_simplejwt.authentication.JWTAuthentication",
),

@nezhar
Copy link
Member

nezhar commented Sep 8, 2022

Hey @nittolese,

I'm not able to reproduce this in a test, but at the same time I see no reason why we should allow any authentication_classes at this stage in the password reset, so I will add this in the next release.

Thanks again

@nezhar nezhar merged commit ee7ec10 into anexia-it:master Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants