User detected as new user (other auth providers)

I am encountering an issue with parse server, I did post the issue on github

But the issue seemed to be considered as a question rather than a bug, even after that a user confirmed having the same issue.
To summarize the issue, if you want to perform some actions only when a user signs up using email/username there is no issue (in my case create some data related to that user and get pointers for it), if the user signs up using Facebook/Google/Twitter to create an account the action performs correctly, but if the user connects again the parse server detects him as a new user each time which leads to the afterSave trigger being triggered each time the user performs a login.
The user that confirmed having the same issue proposed this

This is an issue I had when I created my own auth provider (custom 2fa), and when ever users login using that auth provider an after save triggers for the user as a newly created user, my workaround was to create a lock object when the user is created in beforeSave so when after save I check if that lock exists then yes it is a new user otherwise it is this bug.

The solution will force you to add maybe another class or column, I can’t rely on this one due to the complexity and the size of what I already have.
Any ideas or solutions are welcome, thanks.

I see some open comments on your PR and I’ve just left one more. Could you please check it out?