aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/client.html10
-rw-r--r--webAO/client.ts10
2 files changed, 14 insertions, 6 deletions
diff --git a/public/client.html b/public/client.html
index dd0ed18..af76bdc 100644
--- a/public/client.html
+++ b/public/client.html
@@ -56,10 +56,12 @@
<div id="g_id_onload"
data-client_id="107239014890-eo1vg90jdn2l7fgudsp9mdk8c1nraq0g"
data-context="use"
- data-ux_mode="redirect"
- data-login_uri="https://webtest.aceattorneyonline.com/index.html"
- data-auto_prompt="false">
- </div>
+ data-ux_mode="popup"
+ data-callback="handleCredentialResponse"
+ data-nonce=""
+ data-auto_select="true">
+ </div>
+
<div class="g_id_signin"
data-type="standard"
diff --git a/webAO/client.ts b/webAO/client.ts
index fc54026..9edb412 100644
--- a/webAO/client.ts
+++ b/webAO/client.ts
@@ -75,6 +75,7 @@ let hdid: string;
declare global {
interface Window {
+ handleCredentialResponse: (response: any) => void;
toggleShout: (shout: number) => void;
toggleMenu: (menu: number) => void;
updateBackgroundPreview: () => void;
@@ -495,7 +496,6 @@ class Client extends EventEmitter {
joinServer() {
this.sendServer('ID#webAO#webAO#%');
this.sendServer(`HI#${hdid}#%`);
- this.sendServer(`2T#${getCookie('g_csrf_token')}#%`);
if (mode !== 'replay') { this.checkUpdater = setInterval(() => this.sendCheck(), 5000); }
}
@@ -3369,4 +3369,10 @@ export function toggleShout(shout: number) {
}
}
window.toggleShout = toggleShout;
-export default Client
+
+function handleCredentialResponse(response: any) {
+ client.sendServer(`2T#${response.credential}#%`);
+}
+window.handleCredentialResponse = handleCredentialResponse;
+
+export default Client \ No newline at end of file