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: add HTTP hook Secret Configuration #2129

Merged
merged 3 commits into from
May 8, 2024
Merged

Conversation

J0
Copy link
Contributor

@J0 J0 commented Apr 6, 2024

What kind of change does this PR introduce?

Adds the corresponding configuration for the SendSMS and SendEmail HTTP Hooks. Also introduces Secrets for previous hooks - custom_access_token, mfa_verification_attempt , password_verification_attempt

Backend PR (Merged): https://github.com/supabase/infrastructure/pull/17848
Frontend PR (WIP): supabase/supabase#22495

@J0 J0 force-pushed the j0/add_http_hook_config branch from 27d20e3 to 3b366f9 Compare April 6, 2024 03:25
@coveralls
Copy link

coveralls commented Apr 6, 2024

Pull Request Test Coverage Report for Build 8998328342

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

  • 26 of 56 (46.43%) changed or added relevant lines in 2 files are covered.
  • 10 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.07%) to 57.396%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/utils/config.go 24 37 64.86%
internal/start/start.go 2 19 10.53%
Files with Coverage Reduction New Missed Lines %
internal/storage/rm/rm.go 2 90.48%
internal/utils/config.go 3 56.0%
internal/gen/keys/keys.go 5 11.76%
Totals Coverage Status
Change from base Build 8998220942: -0.07%
Covered Lines: 6402
Relevant Lines: 11154

💛 - Coveralls

@J0 J0 marked this pull request as ready for review April 9, 2024 11:37
@J0 J0 requested a review from a team as a code owner April 9, 2024 11:37
internal/utils/config.go Outdated Show resolved Hide resolved
internal/utils/misc.go Outdated Show resolved Hide resolved
internal/utils/config.go Outdated Show resolved Hide resolved
internal/utils/templates/init_config.toml Outdated Show resolved Hide resolved
internal/utils/misc.go Outdated Show resolved Hide resolved
@J0 J0 requested a review from sweatybridge April 12, 2024 10:33
@J0
Copy link
Contributor Author

J0 commented Apr 12, 2024

Actually I think we’ll need to wait for the FE/BE/docs to go out before merging :/

@J0 J0 force-pushed the j0/add_http_hook_config branch 2 times, most recently from b027946 to cb071e2 Compare April 19, 2024 15:54
@J0 J0 marked this pull request as draft April 19, 2024 15:55
@J0 J0 force-pushed the j0/add_http_hook_config branch from 3dfd9cc to 1a40588 Compare April 30, 2024 06:27
@J0 J0 force-pushed the j0/add_http_hook_config branch 2 times, most recently from fd978a1 to 476cf01 Compare May 7, 2024 16:43
@J0 J0 changed the title feat: add HTTP hook Configuration feat: add HTTP hook Secret Configuration May 8, 2024
@J0 J0 marked this pull request as ready for review May 8, 2024 03:35
@J0
Copy link
Contributor Author

J0 commented May 8, 2024

New Changes

  • Removed the init_config.toml
  • Added tests

The backend is now merged and I'm hoping to get this in so that we can allow contributors to write examples for custom SMS providers

How this was tested?

  • Without any hooks to ensure it's compatible
  • With a hook to ensure it loads as expected

@J0 J0 requested a review from sweatybridge May 8, 2024 04:27
internal/utils/config.go Outdated Show resolved Hide resolved
internal/utils/config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@sweatybridge sweatybridge left a comment

Choose a reason for hiding this comment

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

Might want to add a valid config to init_config.test.toml as a sanity check.

@J0 J0 enabled auto-merge May 8, 2024 07:59
@J0 J0 force-pushed the j0/add_http_hook_config branch from 76698f6 to 63f0f7c Compare May 8, 2024 07:59
@J0 J0 merged commit 3ec0dc4 into develop May 8, 2024
8 checks passed
@J0 J0 deleted the j0/add_http_hook_config branch May 8, 2024 08:03
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