-
Notifications
You must be signed in to change notification settings - Fork 399
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
fix: magiclink & recover verification should send login instead of signup action #395
Conversation
kangmingtay
commented
Feb 24, 2022
- Currently, the verification for a magiclink / recover sends a sign up action to the audit_log_entries table.
- We should be sending a login action instead.
🎉 This PR is included in version 2.5.15 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
@@ -200,7 +200,7 @@ func (a *API) recoverVerify(ctx context.Context, conn *storage.Connection, user | |||
return terr | |||
} | |||
if !user.IsConfirmed() { | |||
if terr = models.NewAuditLogEntry(tx, instanceID, user, models.UserSignedUpAction, nil); terr != nil { | |||
if terr = models.NewAuditLogEntry(tx, instanceID, user, models.LoginAction, nil); terr != nil { |
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.
Wouldn't the user signed up action be correct since it's guarded by the !user.IsConfirmed()
check? Maybe a separate audit log entry should be made with the login action if the user is confirmed?
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.
hmm good point, yeah i overlooked this, let me make a change! thanks for catching this 🔥
…firmed This fixes a leftover bug following PRs supabase#395 and supabase#396.
…firmed (supabase#423) This fixes a leftover bug following PRs supabase#395 and supabase#396.
…firmed (supabase#423) This fixes a leftover bug following PRs supabase#395 and supabase#396.
…firmed (supabase#423) This fixes a leftover bug following PRs supabase#395 and supabase#396.