question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The field current_password of Set Username endpoint is not required as it should be

See original GitHub issue

Hi Djoser team, Thank you very much for creating such an amazing library. I am having an issue when using Djoser. That is when I used this endpoint: https://djoser.readthedocs.io/en/2.0.3/base_endpoints.html#set-username The current_password field is not required as it should be. We could update email without providing the current_password. if this makes sense, could I submit a PR to add required to the appropriate field?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

2reactions
truonghncommented, Apr 20, 2020

@krish1237 , yeah, I had this config on the setting file so I don’t need to have two endpoints, just FYI:

DJOSER = {
    'SERIALIZERS': {
        'set_username': 'accounts.serializers.AccountSetUsernameSerializer',
    }
}
2reactions
krishchilverycommented, Apr 20, 2020

Updating the code of core lib is never a good approach. Your approach is a better fix for now but you have to add a separate url endpoint that means two endpoints exist now. /users/me/ and /path/to/AccountSetUsername/

I have raised a pull request with the updated code. Lets see what happens. It should work with all existing tests

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to protect the password field in Mongoose/MongoDB so it ...
I will have the Blog document and the user populated too, but how do I prevent Mongoose/MongoDB from returning the password field? The...
Read more >
Internal users new and existing are unable to reset or set their ...
After upgrading to the latest fixed release internal directory users are unable to reset their forgotten passwords or any accounts created with the...
Read more >
New Universal Login Experience - Auth0
On the login page autocomplete is set to "current-password" . The login page automatically fills in the password if it's available in the...
Read more >
Troubleshoot self-service password reset writeback- Azure ...
Learn how to troubleshoot common problems and resolution steps for self-service password reset writeback in Azure Active Directory.
Read more >
Gerrit Code Review - /accounts/ REST API
The options for setting/generating the HTTP password must be provided in the request body inside a HttpPasswordInput entity. The account must have a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found