@prido What logic? Give us the use case.
What you’re describing sounds like dealing with conflicts (i.e. the data was changed in between the user requesting a resource and then updating it). In which case, this isn’t a Passport issue and HTTP headers exist for this exact scenario (search for “Lost update problem” in a search engine).
If the record has been updated on the server in between the user loading it and then submitting updates, your API should return a 409 Conflict response. Your Angular app (or any consumer of your API) can then take this to mean the resource has since been modified, and your Angular app can then do any logic of presenting a UI option to allow the user to either overwrite the record on the server with their changes, or abort the operation.