mirror of
https://github.com/HeyPuter/puter.git
synced 2026-09-25 22:55:58 +00:00
Use root URL as default signup redirect
When reload_on_success is set, use '/' as the fallback redirect URL instead of the current page (window.location.href). This prevents redirecting back to the signup page after a successful signup while preserving any explicit options.redirect_url value.
This commit is contained in:
@@ -343,7 +343,7 @@ function UIWindowSignup (options) {
|
||||
if ( options.reload_on_success ) {
|
||||
window.onbeforeunload = null;
|
||||
// either options.redirect_url or the current page
|
||||
const redirectUrl = options.redirect_url || window.location.href;
|
||||
const redirectUrl = options.redirect_url || '/';
|
||||
window.location.replace(redirectUrl);
|
||||
} else if ( options.send_confirmation_code || data.user?.requires_email_confirmation ) {
|
||||
$(el_window).close();
|
||||
|
||||
Reference in New Issue
Block a user