-
Notifications
You must be signed in to change notification settings - Fork 543
feat: add phone to sms webhook payload #2160
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4b8055b
to
1332aa9
Compare
hf
approved these changes
Sep 15, 2025
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.
How did it go missing for so long...
Anyway mind updating these docs here? https://github.com/supabase/supabase/blob/master/apps/docs/content/guides/auth/auth-hooks/send-sms-hook.mdx
hf
approved these changes
Sep 23, 2025
1332aa9
to
5e491ea
Compare
Pull Request Test Coverage Report for Build 17941568512Details
💛 - Coveralls |
cemalkilic
pushed a commit
that referenced
this pull request
Sep 23, 2025
🤖 I have created a release *beep* *boop* --- ## [2.180.0](v2.179.0...v2.180.0) (2025-09-23) ### Features * add OAuth client type ([#2152](#2152)) ([b118f1f](b118f1f)) * add phone to sms webhook payload ([#2160](#2160)) ([d475ac1](d475ac1)) * background template reloading p1 - baseline decomposition ([#2148](#2148)) ([746c937](746c937)) * config reloading with fsnotify, poller fallback, and signals ([#2161](#2161)) ([c77d512](c77d512)) * enhance issuer URL validation in OAuth server metadata ([#2164](#2164)) ([a9424d2](a9424d2)) * implement OAuth2 authorization endpoint ([#2107](#2107)) ([5318552](5318552)) * **oauth2:** add `/oauth/token` endpoint ([#2159](#2159)) ([a89a0b0](a89a0b0)) * **oauth2:** add admin endpoint to regenerate OAuth client secrets ([#2170](#2170)) ([0bd1c28](0bd1c28)) * **oauth2:** return redirect_uri on GET authorization ([#2175](#2175)) ([b0a0c3e](b0a0c3e)) * **oauth2:** use `id` field as the public client_id ([#2154](#2154)) ([86b7de4](86b7de4)) * **openapi:** add OAuth 2.1 server endpoints and clarify OAuth modes ([#2165](#2165)) ([1f804a2](1f804a2)) * password changed email notification ([#2176](#2176)) ([fe0fd04](fe0fd04)) * support `transfer_sub` in apple id tokens ([#2162](#2162)) ([8a71006](8a71006)) ### Bug Fixes * ensure request context exists in API db operations ([#2171](#2171)) ([060a992](060a992)) * **makefile:** remove invalid @ symbol from shell commands ([#2168](#2168)) ([e6afe45](e6afe45)) * **oauth2:** switch to Origin header for request validation ([#2174](#2174)) ([42bc9ab](42bc9ab)) --- 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>
issuedat
pushed a commit
that referenced
this pull request
Sep 30, 2025
## What kind of change does this PR introduce? This PR adds the phone number to the SendSMS webhook, when a phone factor is challenged or a phone confirmation is required. ## What is the current behavior? Currently, the SMS webhook only sends the `user_id` and the `otp_code`. However, we have no way of knowing which factor (device) was used in case the send SMS webhook is used for MFA (as opposed to phone confirmation, which uses the user's phone number), and there is more than one device enrolled for a single user. ## What is the new behavior? The webhook payload contains `phone`, which is either the user's phone number for phone confirmation or the factor phone number for MFA with a phone factor. ## Additional context Add any other context or screenshots.
issuedat
pushed a commit
that referenced
this pull request
Sep 30, 2025
🤖 I have created a release *beep* *boop* --- ## [2.180.0](v2.179.0...v2.180.0) (2025-09-23) ### Features * add OAuth client type ([#2152](#2152)) ([b118f1f](b118f1f)) * add phone to sms webhook payload ([#2160](#2160)) ([d475ac1](d475ac1)) * background template reloading p1 - baseline decomposition ([#2148](#2148)) ([746c937](746c937)) * config reloading with fsnotify, poller fallback, and signals ([#2161](#2161)) ([c77d512](c77d512)) * enhance issuer URL validation in OAuth server metadata ([#2164](#2164)) ([a9424d2](a9424d2)) * implement OAuth2 authorization endpoint ([#2107](#2107)) ([5318552](5318552)) * **oauth2:** add `/oauth/token` endpoint ([#2159](#2159)) ([a89a0b0](a89a0b0)) * **oauth2:** add admin endpoint to regenerate OAuth client secrets ([#2170](#2170)) ([0bd1c28](0bd1c28)) * **oauth2:** return redirect_uri on GET authorization ([#2175](#2175)) ([b0a0c3e](b0a0c3e)) * **oauth2:** use `id` field as the public client_id ([#2154](#2154)) ([86b7de4](86b7de4)) * **openapi:** add OAuth 2.1 server endpoints and clarify OAuth modes ([#2165](#2165)) ([1f804a2](1f804a2)) * password changed email notification ([#2176](#2176)) ([fe0fd04](fe0fd04)) * support `transfer_sub` in apple id tokens ([#2162](#2162)) ([8a71006](8a71006)) ### Bug Fixes * ensure request context exists in API db operations ([#2171](#2171)) ([060a992](060a992)) * **makefile:** remove invalid @ symbol from shell commands ([#2168](#2168)) ([e6afe45](e6afe45)) * **oauth2:** switch to Origin header for request validation ([#2174](#2174)) ([42bc9ab](42bc9ab)) --- 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>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
This PR adds the phone number to the SendSMS webhook, when a phone factor is challenged or a phone confirmation is required.
What is the current behavior?
Currently, the SMS webhook only sends the
user_id
and theotp_code
. However, we have no way of knowing which factor (device) was used in case the send SMS webhook is used for MFA (as opposed to phone confirmation, which uses the user's phone number), and there is more than one device enrolled for a single user.What is the new behavior?
The webhook payload contains
phone
, which is either the user's phone number for phone confirmation or the factor phone number for MFA with a phone factor.Additional context
Add any other context or screenshots.