-
Notifications
You must be signed in to change notification settings - Fork 385
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
feat: add password_hash
and id
fields to admin create user
#1641
Conversation
Pull Request Test Coverage Report for Build 9719783224Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9720581586Details
💛 - Coveralls |
5b3b5ea
to
5a550fd
Compare
Pull Request Test Coverage Report for Build 9720699259Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 9720709431Details
💛 - Coveralls |
password_hash
field to admin create userpassword_hash
and id
fields to admin create user
Pull Request Test Coverage Report for Build 9770704831Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thanks! 💯
Pull Request Test Coverage Report for Build 9783281044Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
🤖 I have created a release *beep* *boop* --- ## [2.155.0](v2.154.2...v2.155.0) (2024-07-03) ### Features * add `password_hash` and `id` fields to admin create user ([#1641](#1641)) ([20d59f1](20d59f1)) ### Bug Fixes * improve mfa verify logs ([#1635](#1635)) ([d8b47f9](d8b47f9)) * invited users should have a temporary password generated ([#1644](#1644)) ([3f70d9d](3f70d9d)) * upgrade golang-jwt to v5 ([#1639](#1639)) ([2cb97f0](2cb97f0)) * use pointer for `user.EncryptedPassword` ([#1637](#1637)) ([bbecbd6](bbecbd6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ase#1641) ## What kind of change does this PR introduce? * Add a `password_hash` field to admin create user, which allows an admin to create a user with a given password hash (argon2 or bcrypt) * Add an `id` field to admin create user, which allows an admin to create a user with a custom id * To prevent someone from creating a bunch of users with a high bcrypt hashing cost, we opt to rehash the password with the default cost (10) on subsequent sign-in. ## What is the current behavior? * Only plaintext passwords are allowed, which will subsequently be hashed internally ## What is the new behavior? Example request using the bcrypt hash of "test": ```bash $ curl -X POST 'http://localhost:9999/admin/users' \ -H 'Authorization: Bearer <admin_jwt>' \ -H 'Content-Type: application/json' \ -d '{"email": "foo@example.com", "password_hash": "$2y$10$SXEz2HeT8PUIGQXo9yeUIem8KzNxgG0d7o/.eGj2rj8KbRgAuRVlq"}' ``` Example request using a custom id: ```bash $ curl -X POST 'http://localhost:9999/admin/users' \ -H 'Authorization: Bearer <admin_jwt>' \ -H 'Content-Type: application/json' \ -d '{"id": "2a8813c2-bda7-47f0-94a6-49fcfdf61a70", "email": "foo@example.com"}' ``` Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots.
🤖 I have created a release *beep* *boop* --- ## [2.155.0](supabase/auth@v2.154.2...v2.155.0) (2024-07-03) ### Features * add `password_hash` and `id` fields to admin create user ([supabase#1641](supabase#1641)) ([20d59f1](supabase@20d59f1)) ### Bug Fixes * improve mfa verify logs ([supabase#1635](supabase#1635)) ([d8b47f9](supabase@d8b47f9)) * invited users should have a temporary password generated ([supabase#1644](supabase#1644)) ([3f70d9d](supabase@3f70d9d)) * upgrade golang-jwt to v5 ([supabase#1639](supabase#1639)) ([2cb97f0](supabase@2cb97f0)) * use pointer for `user.EncryptedPassword` ([supabase#1637](supabase#1637)) ([bbecbd6](supabase@bbecbd6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ase#1641) ## What kind of change does this PR introduce? * Add a `password_hash` field to admin create user, which allows an admin to create a user with a given password hash (argon2 or bcrypt) * Add an `id` field to admin create user, which allows an admin to create a user with a custom id * To prevent someone from creating a bunch of users with a high bcrypt hashing cost, we opt to rehash the password with the default cost (10) on subsequent sign-in. ## What is the current behavior? * Only plaintext passwords are allowed, which will subsequently be hashed internally ## What is the new behavior? Example request using the bcrypt hash of "test": ```bash $ curl -X POST 'http://localhost:9999/admin/users' \ -H 'Authorization: Bearer <admin_jwt>' \ -H 'Content-Type: application/json' \ -d '{"email": "foo@example.com", "password_hash": "$2y$10$SXEz2HeT8PUIGQXo9yeUIem8KzNxgG0d7o/.eGj2rj8KbRgAuRVlq"}' ``` Example request using a custom id: ```bash $ curl -X POST 'http://localhost:9999/admin/users' \ -H 'Authorization: Bearer <admin_jwt>' \ -H 'Content-Type: application/json' \ -d '{"id": "2a8813c2-bda7-47f0-94a6-49fcfdf61a70", "email": "foo@example.com"}' ``` Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots.
🤖 I have created a release *beep* *boop* --- ## [2.155.0](supabase/auth@v2.154.2...v2.155.0) (2024-07-03) ### Features * add `password_hash` and `id` fields to admin create user ([supabase#1641](supabase#1641)) ([20d59f1](supabase@20d59f1)) ### Bug Fixes * improve mfa verify logs ([supabase#1635](supabase#1635)) ([d8b47f9](supabase@d8b47f9)) * invited users should have a temporary password generated ([supabase#1644](supabase#1644)) ([3f70d9d](supabase@3f70d9d)) * upgrade golang-jwt to v5 ([supabase#1639](supabase#1639)) ([2cb97f0](supabase@2cb97f0)) * use pointer for `user.EncryptedPassword` ([supabase#1637](supabase#1637)) ([bbecbd6](supabase@bbecbd6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ase#1641) ## What kind of change does this PR introduce? * Add a `password_hash` field to admin create user, which allows an admin to create a user with a given password hash (argon2 or bcrypt) * Add an `id` field to admin create user, which allows an admin to create a user with a custom id * To prevent someone from creating a bunch of users with a high bcrypt hashing cost, we opt to rehash the password with the default cost (10) on subsequent sign-in. ## What is the current behavior? * Only plaintext passwords are allowed, which will subsequently be hashed internally ## What is the new behavior? Example request using the bcrypt hash of "test": ```bash $ curl -X POST 'http://localhost:9999/admin/users' \ -H 'Authorization: Bearer <admin_jwt>' \ -H 'Content-Type: application/json' \ -d '{"email": "foo@example.com", "password_hash": "$2y$10$SXEz2HeT8PUIGQXo9yeUIem8KzNxgG0d7o/.eGj2rj8KbRgAuRVlq"}' ``` Example request using a custom id: ```bash $ curl -X POST 'http://localhost:9999/admin/users' \ -H 'Authorization: Bearer <admin_jwt>' \ -H 'Content-Type: application/json' \ -d '{"id": "2a8813c2-bda7-47f0-94a6-49fcfdf61a70", "email": "foo@example.com"}' ``` Feel free to include screenshots if it includes visual changes. ## Additional context Add any other context or screenshots.
🤖 I have created a release *beep* *boop* --- ## [2.155.0](supabase/auth@v2.154.2...v2.155.0) (2024-07-03) ### Features * add `password_hash` and `id` fields to admin create user ([supabase#1641](supabase#1641)) ([20d59f1](supabase@20d59f1)) ### Bug Fixes * improve mfa verify logs ([supabase#1635](supabase#1635)) ([d8b47f9](supabase@d8b47f9)) * invited users should have a temporary password generated ([supabase#1644](supabase#1644)) ([3f70d9d](supabase@3f70d9d)) * upgrade golang-jwt to v5 ([supabase#1639](supabase#1639)) ([2cb97f0](supabase@2cb97f0)) * use pointer for `user.EncryptedPassword` ([supabase#1637](supabase#1637)) ([bbecbd6](supabase@bbecbd6)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
What kind of change does this PR introduce?
password_hash
field to admin create user, which allows an admin to create a user with a given password hash (argon2 or bcrypt)id
field to admin create user, which allows an admin to create a user with a custom idWhat is the current behavior?
What is the new behavior?
Example request using the bcrypt hash of "test":
Example request using a custom id:
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.