{"id":42589599,"url":"https://github.com/linnify/drf-reset-password","last_synced_at":"2026-01-28T23:09:44.365Z","repository":{"id":48922502,"uuid":"276855207","full_name":"linnify/drf-reset-password","owner":"linnify","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-05T14:17:44.000Z","size":74,"stargazers_count":9,"open_issues_count":1,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-27T09:26:50.551Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.linnify.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linnify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-03T09:01:06.000Z","updated_at":"2025-05-13T09:43:37.000Z","dependencies_parsed_at":"2022-08-12T19:51:17.811Z","dependency_job_id":null,"html_url":"https://github.com/linnify/drf-reset-password","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/linnify/drf-reset-password","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnify%2Fdrf-reset-password","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnify%2Fdrf-reset-password/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnify%2Fdrf-reset-password/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnify%2Fdrf-reset-password/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linnify","download_url":"https://codeload.github.com/linnify/drf-reset-password/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linnify%2Fdrf-reset-password/sbom","scorecard":{"id":591167,"data":{"date":"2025-08-11","repo":{"name":"github.com/linnify/drf-reset-password","commit":"540346a0eb805b6c32a5451b4662624064fca65d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/17 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T21:55:56.430Z","repository_id":48922502,"created_at":"2025-08-20T21:55:56.430Z","updated_at":"2025-08-20T21:55:56.430Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28854546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T22:56:21.783Z","status":"ssl_error","status_checked_at":"2026-01-28T22:56:00.861Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-28T23:09:44.307Z","updated_at":"2026-01-28T23:09:44.359Z","avatar_url":"https://github.com/linnify.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":" # DRF Reset Password\n\nThis is an easy to include library that takes care of managing the reset password part of your application.\nIt offers 3 endpoints used for creating, validating and submitting the password change. The user is offered\nthe liberty to choose how the reset password link is sent to the user and where it will redirect the user.\n\n## Requirements\n\nPython \u003e= 3.7\n\nDjango \u003e= 3.0\n\nWe highly recommend and only officially support the latest patch release of each Python and Django series.\n\n ## Installation\n \n The command to install the package from pypi using pip:\n\n```\npip install drf-reset-password\n```\n\nAdd ``reset_password`` to your `INSTALLED_APPS` in settings:\n\n```.python\nINSTALLED_APPS=[\n    ...\n    'reset_password',\n]\n```\n\n ## Configuration\n\nYou can configure the library from the variable `DRF_RESET_EMAIL` that you will set in your settings.\n\n```python\n{\n    'RESET_PASSWORD_EMAIL_TITLE': 'Reset Password',\n    'RESET_PASSWORD_EMAIL_TEMPLATE': 'reset_email.html',\n    'EMAIL_EXPIRATION_TIME': 24,\n    'REDIRECT_LINK': 'dsa',\n    'APP_NAME': 'test',\n    'EMAIL_PROVIDER': 'reset_password.models.EmailProvider',\n    'CONTENT_PROVIDER': 'reset_password.models.DefaultContentProvider',\n    'EMAIL_FIELD': 'email',\n    'CUSTOM_PASSWORD_SET': False,\n}\n```\n\n`RESET_PASSWORD_EMAIL_TITLE` - Sets the title of the email sent. `RESET_PASSWORD_EMAIL_TITLE` is on default on Reset Password.\n\n`RESET_PASSWORD_EMAIL_TEMPLATE` -  You can change the default template with your own template.`RESET_PASSWORD_EMAIL_TEMPLATE` is on default on our default template.\n\n`EMAIL_EXPIRATION_TIME` - The amount of time it takes for the email to expire. `EMAIL_EXPIRATION_TIME` is on default on 24 hours.\n\n`REDIRECT_LINK` - The url of your redirect link inside the email (you can access it inside your own template with the variable `link`).\n\n`APP_NAME` - The name of you app that will be mentioned inside the email.\n\n`EMAIL_PROVIDER` - The class which will be called to send the email (The class has to extend the class EmailProvider and implement the method send_email).\n\n`EMAIL_FIELD` - This is the field on the user that contains the email. If you are using django a user model\nyou should always have it on email. `EMAIL_FIELD` is on default on email.\n\n`CONTENT_PROVIDER` - The class which will be called to build the content of the email\n (The class has to extend the class ContentProvider and implement the method\n  make_content.). If none set, a DefaultContentProvider will be set, creating content\n   with the above specified details (template, link, etc.).\n  \n`CUSTOM_PASSWORD_SET` - A boolean variable which tells if the password should be\n saved in a custom way, when catching the `custom_password_update` signal (`True\n `), or, in the default way (`False`). Note that the status of the token should also\n  be set to `ACCEPTED` if the password was set successfully.\n\n`RETURN_EMAIL_NOT_FOUND_ERROR` - A boolean which specifies if the reset password request should return a 400 error\nif the email does not exist in the system. The default value is `True`. If set to `False`, the endpoint will return a 201\nstatus code\n\n## Template Creation \n\nThis is an example on how your template should look. We give you 3 variables that you can access which are\n`app_name`, `link` and `email` (this is the email of the user which had his password changed).\n\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cp\u003eHello,\u003c/p\u003e\n  \u003cp\u003eFollow this link to reset your {{ app_name }} password for your {{ email }} account.\u003c/p\u003e\n  \u003cp\u003e\u003ca href='{{ link }}'\u003e{{ link }}%\u003c/a\u003e\u003c/p\u003e\n  \u003cp\u003eIf you didn’t ask to reset your password, you can contact us.\u003c/p\u003e\n  \u003cp\u003eThanks,\u003c/p\u003e\n  \u003cp\u003eYour {{ app_name }} team\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## Final steps for set up\n\nWhen you are done with configuring your `reset_password` app you can add it to your `urls` and start making calls.\n\n```python\nfrom django.conf.urls import url\nfrom django.urls import include\nfrom rest_framework import routers\nfrom reset_password.views import ResetPasswordView\n\nrouter = routers.DefaultRouter(trailing_slash=False)\nrouter.register(\"reset-password\", ResetPasswordView, basename=\"reset_password\")\nurlpatterns = [\n    ...,\n    url(r\"^\", include(router.urls)),\n]\n```\n\n## Endpoints\n\nThe app has 3 endpoints: \n- one for generating the email for reset password\n- one for validating the token inside the email \n- one for changing the password.\n\n### Create Endpoint\n\nThis endpoint receives the email address and calls for the `EMAIL_PROVIDER` to send the email to the\nuser.\n\n```\nPOST /reset-password\n```\nRequest payload\n```\n{\n  \"email\": \"example@google.com\"\n}\n```\n\nIt has an empty response with `201` if successful and `400` if email is not valid.\n\n### Token Validation\n\nThis endpoint receives the token through the query param `token` and it verifies if it is valid.\n\n```\nGET /reset-password/token-validation\n```\n\nIt has an empty response with `200` if successful and `400` if token is not valid.\n\n\n### Change Password\n\nThis endpoint receives the token through the query param `token` and verifies if it is valid. It changes\nthe user's password with the one sent in the request payload.\n\n```\nPOST /reset-password/submit\n```\nRequest payload\n```json\n{\n  \"password\": \"password\"\n}\n```\n\nIt has an empty response with `200` if successful and `400` if the token or the password are invalid.\n\n\n\nGood luck using it and if you have any question or suggestions please contact us.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinnify%2Fdrf-reset-password","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinnify%2Fdrf-reset-password","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinnify%2Fdrf-reset-password/lists"}