'firebase: map multiple webpages as action urls depending on the origin site

Say we have 2 sites:
example1.com
example2.com

Is there a way to map reset password action url according to those sites? e.g.
reset password action url 1: example1.com/resetpassword
reset password action url 2: example2.com/resetpassword

If not, is there a better solution for this scenario?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source