• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / auth / 15169693367

21 May 2025 06:17PM UTC coverage: 70.003% (-0.01%) from 70.016%
15169693367

Pull #2032

github

Chris Stockton
feat: add before user created hook to pkg api

This commit explores one possible implementation of this hook by:
- Adding a `triggerBeforeUserCreated` to the *API object
- Updating `signupNewUser` to accept an `*http.Request` param
- Updating the following files with param r:
    - anonymous.go
    - external.go
    - invite.go
    - mail.go
    - signup.go
- Calling `triggerBeforeUserCreated` from `signupNewUser`

Pros:
- Very minor change
- Requires minimal testing
- This pattern will be easy to replicate for future hooks as well

Cons:
- Requires calling the hook in a trasaction, something we do today
  but want to move away from over time.

Note:
I've omitted tests from this commit but they have already been
written in a previous pr.
Pull Request #2032: feat: hooks round 5 (Option 1) - add before-user-created hook

11 of 17 new or added lines in 6 files covered. (64.71%)

11134 of 15905 relevant lines covered (70.0%)

64.98 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

57.14
/internal/api/hooks.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc