supabase / auth

A JWT based API for managing users and issuing JWT tokens
https://supabase.com/docs/guides/auth
MIT License
1.55k stars 375 forks source link

fix: add token to hook payload for non-secure email change #1763

Closed J0 closed 2 months ago

J0 commented 2 months ago

What kind of change does this PR introduce?

Fix #1744 by introducing the token to the Auth Hook payload for Send Email. The tokenHash seems to be already present.

Currently, it's passed into the function as otpNew. Though it is indeed the OTP needed to validate the new email address we place it in the token field to maintain the convention that token_hash_new is only populated when secure email change is enabled

New output structure:

image
coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10699210353

Details


Files with Coverage Reduction New Missed Lines %
internal/api/mail.go 7 57.62%
<!-- Total: 7 -->
Totals Coverage Status
Change from base Build 10684529517: -0.02%
Covered Lines: 9138
Relevant Lines: 15781

💛 - Coveralls