fix domain

This commit is contained in:
2026-01-30 22:32:45 -05:00
parent 352a23f008
commit 33026a6ecd
2 changed files with 4 additions and 5 deletions

View File

@@ -40,8 +40,10 @@ function Admin() {
const handleGenerateResetToken = async (userId) => {
try {
const data = await api.generateResetToken(userId);
// Build URL using current domain (works in dev and prod)
const resetUrl = `${window.location.origin}/reset-password/${data.token}`;
setGeneratedUrl({
url: data.resetUrl,
url: resetUrl,
user: data.user,
expiresAt: data.expiresAt
});