diff --git a/internal/api/browser_extension/app/command/request_2fa_token.go b/internal/api/browser_extension/app/command/request_2fa_token.go index 4f09d6b..bcaf8f7 100644 --- a/internal/api/browser_extension/app/command/request_2fa_token.go +++ b/internal/api/browser_extension/app/command/request_2fa_token.go @@ -100,9 +100,10 @@ func (h *Request2FaTokenHandler) Handle(cmd *Request2FaToken) error { return h.Pusher.Send(context.Background(), notification) }, retry.Attempts(5), + retry.LastErrorOnly(true), ) - if err != nil && !messaging.IsRegistrationTokenNotRegistered(err) { + if err != nil && !messaging.IsUnregistered(err) { logging.WithFields(logging.Fields{ "extension_id": extId.String(), "device_id": device.Id.String(), diff --git a/internal/api/mobile/app/command/send_2fa_token.go b/internal/api/mobile/app/command/send_2fa_token.go index de5081f..d4f2834 100644 --- a/internal/api/mobile/app/command/send_2fa_token.go +++ b/internal/api/mobile/app/command/send_2fa_token.go @@ -66,6 +66,7 @@ func (h *Send2FaTokenHandler) Handle(cmd *Send2FaToken) error { return h.WebsocketClient.SendMessage(uri, message) }, retry.Attempts(5), + retry.LastErrorOnly(true), ) if err != nil {