The path after confirming email needs to be relative and not absolute therefore it is edit_password_path(...) instead of edit_password_url(...). edit_password_url(...) further produced weird bugs in production when I used it and I ended up being forwarded to a weird localhost URL which of course did not work.