Update user_meta after password reset - invitation


I have a question about the invitation flow and the reset password ticket, actually this is the flow I’ve got:

  • I create the use with Management API and a random password & email_verified: false
  • I create a reset password ticket with a custom result_url: /api/complete-invitation?foo-bar
  • The user is redirected to the login page and after login he is redirected to the above url

the issue is that if the user after reset the psw doesn’t login through this url but he decide to close the window and login from the normal login page I lose my custom data (foo=bar)…

is it possible somehow to add some metadata based on the result_url after reset the password?