diff --git a/RSSTootalizer/Website/Login.pm b/RSSTootalizer/Website/Login.pm index 7ba7dd2..6c44f2a 100644 --- a/RSSTootalizer/Website/Login.pm +++ b/RSSTootalizer/Website/Login.pm @@ -20,6 +20,8 @@ sub prerender { $self->{"template"} = "Login"; $self->{"content_type"} = "html"; $self->{"params"}->{"currentmode"} = "Login"; + + $self->{"params"}->{"instance"} = $main::FORM{"last_instance"}; } 1; diff --git a/RSSTootalizer/Website/OAuthLogin.pm b/RSSTootalizer/Website/OAuthLogin.pm index 76b2949..e240c2c 100644 --- a/RSSTootalizer/Website/OAuthLogin.pm +++ b/RSSTootalizer/Website/OAuthLogin.pm @@ -40,6 +40,7 @@ sub prerender { my $user = RSSTootalizer::User->authenticate(); if ($user){ $self->{params}->{token_is_valid} = "true"; + $self->{set_cookie} = ("last_instance=$instance; Max-Age=1209600"); } # {"error":"The access token is invalid"} } diff --git a/static/templates/Login.html b/static/templates/Login.html index 692400a..c4d892b 100644 --- a/static/templates/Login.html +++ b/static/templates/Login.html @@ -4,7 +4,7 @@

Please enter your Mastodon instance URL

- + " required autofocus>