added Response.Committed checks

This commit is contained in:
Gani Georgiev
2023-07-20 10:40:03 +03:00
parent b2284b5f4b
commit 610a948dcc
11 changed files with 157 additions and 60 deletions
+4
View File
@@ -85,6 +85,10 @@ func RecordAuthResponse(
event.Meta = meta
return app.OnRecordAuthRequest().Trigger(event, func(e *core.RecordAuthEvent) error {
if e.HttpContext.Response().Committed {
return nil
}
// allow always returning the email address of the authenticated account
e.Record.IgnoreEmailVisibility(true)