Skip to content

Commit

Permalink
Update UserApi.ts to support sha256 hasher (#1941)
Browse files Browse the repository at this point in the history
* Update UserApi.ts to support sha256 hasher

Update UserApi.ts to support sha256 hasher as described here https://clerk.com/docs/reference/backend-api/tag/Users#operation/CreateUser!path=password_hasher&t=request

* Create hungry-bears-allow.md

---------

Co-authored-by: Agis Anastasopoulos <827224+agis@users.noreply.github.com>
Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
  • Loading branch information
3 people authored Oct 30, 2023
1 parent 5452f3f commit 90aa2ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/hungry-bears-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@clerk/backend": patch
---

Add `sha256` hasher support to PasswordHasher as described in [`Users#CreateUser`](https://clerk.com/docs/reference/backend-api/tag/Users#operation/CreateUser!path=password_hasher)
3 changes: 2 additions & 1 deletion packages/backend/src/api/endpoints/UserApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ type PasswordHasher =
| 'pbkdf2_sha256'
| 'pbkdf2_sha256_django'
| 'pbkdf2_sha1'
| 'scrypt_firebase';
| 'scrypt_firebase'
| 'sha256';

type UserPasswordHashingParams = {
passwordDigest: string;
Expand Down

0 comments on commit 90aa2ea

Please sign in to comment.