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

feat: find user by email address #1330

Closed
wants to merge 2 commits into from

Conversation

JKFSOM
Copy link
Contributor

@JKFSOM JKFSOM commented Dec 2, 2023

What kind of change does this PR introduce?

Feature: find user by their email address.

What is the current behaviour?

Users cannot be found via their email address.

What is the new behaviour?

Users can be found via their email address using a new endpoint: GET /admin/users/find.

The new endpoint also supports returning a user by ID. Whilst it's already possible to return a user by their ID (GET /admin/users/{userId}/), owing to the structure of the endpoint, it cannot cleanly be extended to handle email (and likely telephone numbers in the future). It is logical that /find also services user IDs, and therefore it has been added.

/admin/users/{userId}/ remains to prevent breaking changes.

Additional context

https://github.com/orgs/supabase/discussions/19315#discussioncomment-7712527

@JKFSOM JKFSOM requested a review from a team as a code owner December 2, 2023 12:37
@JKFSOM JKFSOM changed the title Find user by email address feat: find user by email address Dec 2, 2023
@JKFSOM
Copy link
Contributor Author

JKFSOM commented Dec 8, 2023

@kangmingtay do you have any information on whether this will be reviewed?

@kangmingtay
Copy link
Member

hi @JKFSOM, thanks for taking the time to contribute but i don't think we'll be adding this endpoint in - the GET /admin/users endpoint actually allows you to filter for a user's email address already:

for example:

curl -X GET "http://localhost:9999/admin/users?filter=<user_email_address>" -H "Authorization: Bearer ADMIN_JWT"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants