Skip to content

feat: send over user in SendSMS Hook instead of UserID - #1551

Merged
J0 merged 5 commits into
masterfrom
j0/send_over_user_in_send_sms_hook
Apr 22, 2024
Merged

J0 merged 5 commits into
masterfrom
j0/send_over_user_in_send_sms_hook

Conversation

@J0

@J0 J0 commented Apr 22, 2024 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

We align convention with SendEmail and send over a user to avoid having the user make an additional getUser call. Also allows access to app_metadata and user_metadata which would be useful for internationalization where you may want the locale of the user to determine which template to send.

We also introduce a PhoneData struct through which we can introduce any potential phone related fields. This struct currently lives under the hooks package as there is no phone package currently and introducing one might require a significant refactor. Importing it as as is under api package would cause a circular dependency between hooks and api packages.

@J0
J0 requested a review from a team as a code owner April 22, 2024 09:40
@coveralls

coveralls commented Apr 22, 2024 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 8782486531

Details

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 65.582%

Totals Coverage Status
Change from base Build 8693432544: 0.003%
Covered Lines: 8144
Relevant Lines: 12418

💛 - Coveralls

Comment thread internal/hooks/auth_hooks.go Resolved
Comment thread internal/hooks/auth_hooks.go Resolved
Comment thread internal/hooks/auth_hooks.go Resolved

@hf hf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't merge without addressing the JSON tags.

@J0
J0 merged commit d4d743c into master Apr 22, 2024
@J0
J0 deleted the j0/send_over_user_in_send_sms_hook branch April 22, 2024 10:46
hf pushed a commit that referenced this pull request Apr 25, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([#1541](#1541))
([1cb4f96](1cb4f96))
* add timeout middleware
([#1529](#1529))
([f96ff31](f96ff31))
* allow for postgres and http functions on each extensibility point
([#1528](#1528))
([348a1da](348a1da))
* merge provider metadata on link account
([#1552](#1552))
([bd8b5c4](bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([#1551](#1551))
([d4d743c](d4d743c))


### Bug Fixes

* return error if session id does not exist
([#1538](#1538))
([91e9eca](91e9eca))

---
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>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

We align convention with `SendEmail` and send over a user to avoid
having the user make an additional `getUser` call. Also allows access to
`app_metadata` and `user_metadata` which would be useful for
internationalization where you may want the locale of the user to
determine which template to send.

We also introduce a `PhoneData` struct through which we can introduce
any potential phone related fields. This struct currently lives under
the `hooks` package as there is no `phone` package currently and
introducing one might require a significant refactor. Importing it as as
is under `api` package would cause a circular dependency between `hooks`
and `api` packages.

---------

Co-authored-by: Stojan Dimitrovski <[email protected]>
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](supabase/auth@v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([supabase#1541](supabase#1541))
([1cb4f96](supabase@1cb4f96))
* add timeout middleware
([supabase#1529](supabase#1529))
([f96ff31](supabase@f96ff31))
* allow for postgres and http functions on each extensibility point
([supabase#1528](supabase#1528))
([348a1da](supabase@348a1da))
* merge provider metadata on link account
([supabase#1552](supabase#1552))
([bd8b5c4](supabase@bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([supabase#1551](supabase#1551))
([d4d743c](supabase@d4d743c))


### Bug Fixes

* return error if session id does not exist
([supabase#1538](supabase#1538))
([91e9eca](supabase@91e9eca))

---
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>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
## What kind of change does this PR introduce?

We align convention with `SendEmail` and send over a user to avoid
having the user make an additional `getUser` call. Also allows access to
`app_metadata` and `user_metadata` which would be useful for
internationalization where you may want the locale of the user to
determine which template to send.

We also introduce a `PhoneData` struct through which we can introduce
any potential phone related fields. This struct currently lives under
the `hooks` package as there is no `phone` package currently and
introducing one might require a significant refactor. Importing it as as
is under `api` package would cause a circular dependency between `hooks`
and `api` packages.

---------

Co-authored-by: Stojan Dimitrovski <[email protected]>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](supabase/auth@v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([supabase#1541](supabase#1541))
([1cb4f96](supabase@1cb4f96))
* add timeout middleware
([supabase#1529](supabase#1529))
([f96ff31](supabase@f96ff31))
* allow for postgres and http functions on each extensibility point
([supabase#1528](supabase#1528))
([348a1da](supabase@348a1da))
* merge provider metadata on link account
([supabase#1552](supabase#1552))
([bd8b5c4](supabase@bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([supabase#1551](supabase#1551))
([d4d743c](supabase@d4d743c))


### Bug Fixes

* return error if session id does not exist
([supabase#1538](supabase#1538))
([91e9eca](supabase@91e9eca))

---
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>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
## What kind of change does this PR introduce?

We align convention with `SendEmail` and send over a user to avoid
having the user make an additional `getUser` call. Also allows access to
`app_metadata` and `user_metadata` which would be useful for
internationalization where you may want the locale of the user to
determine which template to send.

We also introduce a `PhoneData` struct through which we can introduce
any potential phone related fields. This struct currently lives under
the `hooks` package as there is no `phone` package currently and
introducing one might require a significant refactor. Importing it as as
is under `api` package would cause a circular dependency between `hooks`
and `api` packages.

---------

Co-authored-by: Stojan Dimitrovski <[email protected]>
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](supabase/auth@v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([supabase#1541](supabase#1541))
([1cb4f96](supabase@1cb4f96))
* add timeout middleware
([supabase#1529](supabase#1529))
([f96ff31](supabase@f96ff31))
* allow for postgres and http functions on each extensibility point
([supabase#1528](supabase#1528))
([348a1da](supabase@348a1da))
* merge provider metadata on link account
([supabase#1552](supabase#1552))
([bd8b5c4](supabase@bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([supabase#1551](supabase#1551))
([d4d743c](supabase@d4d743c))


### Bug Fixes

* return error if session id does not exist
([supabase#1538](supabase#1538))
([91e9eca](supabase@91e9eca))

---
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>
cemalkilic pushed a commit that referenced this pull request Aug 7, 2025
## What kind of change does this PR introduce?

We align convention with `SendEmail` and send over a user to avoid
having the user make an additional `getUser` call. Also allows access to
`app_metadata` and `user_metadata` which would be useful for
internationalization where you may want the locale of the user to
determine which template to send.

We also introduce a `PhoneData` struct through which we can introduce
any potential phone related fields. This struct currently lives under
the `hooks` package as there is no `phone` package currently and
introducing one might require a significant refactor. Importing it as as
is under `api` package would cause a circular dependency between `hooks`
and `api` packages.

---------

Co-authored-by: Stojan Dimitrovski <[email protected]>
cemalkilic pushed a commit that referenced this pull request Aug 7, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([#1541](#1541))
([1cb4f96](1cb4f96))
* add timeout middleware
([#1529](#1529))
([f96ff31](f96ff31))
* allow for postgres and http functions on each extensibility point
([#1528](#1528))
([348a1da](348a1da))
* merge provider metadata on link account
([#1552](#1552))
([bd8b5c4](bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([#1551](#1551))
([d4d743c](d4d743c))


### Bug Fixes

* return error if session id does not exist
([#1538](#1538))
([91e9eca](91e9eca))

---
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>
xeladotbe pushed a commit to xeladotbe/supabase-auth that referenced this pull request Sep 27, 2025
## What kind of change does this PR introduce?

We align convention with `SendEmail` and send over a user to avoid
having the user make an additional `getUser` call. Also allows access to
`app_metadata` and `user_metadata` which would be useful for
internationalization where you may want the locale of the user to
determine which template to send.

We also introduce a `PhoneData` struct through which we can introduce
any potential phone related fields. This struct currently lives under
the `hooks` package as there is no `phone` package currently and
introducing one might require a significant refactor. Importing it as as
is under `api` package would cause a circular dependency between `hooks`
and `api` packages.

---------

Co-authored-by: Stojan Dimitrovski <[email protected]>
xeladotbe pushed a commit to xeladotbe/supabase-auth that referenced this pull request Sep 27, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](supabase/auth@v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([supabase#1541](supabase#1541))
([1cb4f96](supabase@1cb4f96))
* add timeout middleware
([supabase#1529](supabase#1529))
([f96ff31](supabase@f96ff31))
* allow for postgres and http functions on each extensibility point
([supabase#1528](supabase#1528))
([348a1da](supabase@348a1da))
* merge provider metadata on link account
([supabase#1552](supabase#1552))
([bd8b5c4](supabase@bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([supabase#1551](supabase#1551))
([d4d743c](supabase@d4d743c))


### Bug Fixes

* return error if session id does not exist
([supabase#1538](supabase#1538))
([91e9eca](supabase@91e9eca))

---
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>
fadymak pushed a commit that referenced this pull request Sep 30, 2025
## What kind of change does this PR introduce?

We align convention with `SendEmail` and send over a user to avoid
having the user make an additional `getUser` call. Also allows access to
`app_metadata` and `user_metadata` which would be useful for
internationalization where you may want the locale of the user to
determine which template to send.

We also introduce a `PhoneData` struct through which we can introduce
any potential phone related fields. This struct currently lives under
the `hooks` package as there is no `phone` package currently and
introducing one might require a significant refactor. Importing it as as
is under `api` package would cause a circular dependency between `hooks`
and `api` packages.

---------

Co-authored-by: Stojan Dimitrovski <[email protected]>
fadymak pushed a commit that referenced this pull request Sep 30, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.150.0](v2.149.0...v2.150.0)
(2024-04-25)


### Features

* add support for Azure CIAM login
([#1541](#1541))
([1cb4f96](1cb4f96))
* add timeout middleware
([#1529](#1529))
([f96ff31](f96ff31))
* allow for postgres and http functions on each extensibility point
([#1528](#1528))
([348a1da](348a1da))
* merge provider metadata on link account
([#1552](#1552))
([bd8b5c4](bd8b5c4))
* send over user in SendSMS Hook instead of UserID
([#1551](#1551))
([d4d743c](d4d743c))


### Bug Fixes

* return error if session id does not exist
([#1538](#1538))
([91e9eca](91e9eca))

---
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants