account: send username and sessionid when redirecting to /logged-in page

This also logs in user on website

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2022-06-19 16:50:26 +02:00
committed by GitHub
parent b96867bb06
commit fcd869fa10

View File

@@ -246,7 +246,12 @@ public class SessionManager
// Save session to disk
saveSession();
req.getResponseHeaders().set("Location", oauthRedirect);
final HttpUrl redirect = HttpUrl.get(oauthRedirect).newBuilder()
.addQueryParameter("username", username)
.addQueryParameter("sessionId", sessionId.toString())
.build();
req.getResponseHeaders().set("Location", redirect.toString());
req.sendResponseHeaders(302, 0);
}
catch (Exception e)