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

fix: magiclink & recover verification should send login instead of signup action #395

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

kangmingtay
Copy link
Member

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

@kangmingtay kangmingtay merged commit 4dced2e into master Feb 24, 2022
@kangmingtay kangmingtay deleted the km/fix-magiclink-and-recover-action-type branch February 24, 2022 11:10
@github-actions
Copy link
Contributor

🎉 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 {
Copy link
Contributor

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?

Copy link
Member Author

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 🔥

bnjmnt4n added a commit to bnjmnt4n/gotrue that referenced this pull request Mar 23, 2022
kangmingtay pushed a commit that referenced this pull request Mar 23, 2022
…firmed (#423)

This fixes a leftover bug following PRs #395 and #396.
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
uxodb pushed a commit to uxodb/auth that referenced this pull request Nov 13, 2024
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 13, 2024
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
LashaJini pushed a commit to LashaJini/auth that referenced this pull request Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants