mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Allow playing full version in browser via steam sso
This commit is contained in:
@@ -2,6 +2,20 @@
|
||||
var loadTimeout = null;
|
||||
var callbackDone = false;
|
||||
|
||||
var searchString = window.location.search;
|
||||
if (searchString.includes("steam_sso_auth_token=")) {
|
||||
var pos = searchString.indexOf("steam_sso_auth_token");
|
||||
const authToken = searchString.substring(pos + 21, pos + 57);
|
||||
try {
|
||||
window.localStorage.setItem("steam_sso_auth_token", authToken);
|
||||
window.location.replace(window.location.protocol + "//" + window.location.host);
|
||||
} catch (ex) {
|
||||
alert("Failed to login via Steam SSO: " + ex);
|
||||
window.location.replace("https://shapez.io");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Catch load errors
|
||||
|
||||
function errorHandler(event, source, lineno, colno, error) {
|
||||
|
||||
Reference in New Issue
Block a user