Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/routes/ReqPasswordChange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ export default function ReqPasswordChange() {
setLoading(true);

const { error } = await supabase.auth.resetPasswordForEmail(email, {
// dynamically builds the base URL to support both coding-cat.club and
// the github pages deployment at coding-cat-official.github.io/coding-cat
// !! if this is edited, it needs to match with the Supabase redirect URLs !!
// check 'Authentication/URL Configuration
// ${window.location.origin} sets it dynamically to localhost or coding-cat.club
redirectTo: `${window.location.origin}/`
// check 'Authentication/URL Configuration'
redirectTo: `${window.location.origin}${window.location.pathname.split('/').slice(0, 2).join('/')}/`
});

if(error){
Expand Down
Loading