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

Implemented the possibility to return the username and email address when validating a token #184

Merged

Conversation

mikelandzelo173
Copy link
Contributor

There's a new setting for this which is set to False by default. If you set DJANGO_REST_PASSWORDRESET_USER_DETAILS_ON_VALIDATION to True then a validation call for a token will return the username and email address for the corresponding user:

{
    "status": "OK",
    "username": "superuser",
    "email": "[email protected]"
}

This is often needed for password reset pages where you have to show for which account you are resetting the password.

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (c225102) 90.40% compared to head (33c91a1) 90.57%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
+ Coverage   90.40%   90.57%   +0.17%     
==========================================
  Files          12       12              
  Lines         271      276       +5     
==========================================
+ Hits          245      250       +5     
  Misses         26       26              
Files Coverage Δ
django_rest_passwordreset/views.py 94.94% <100.00%> (+0.26%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nezhar nezhar merged commit 71281c4 into anexia-it:master Feb 9, 2024
70 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants