From 8bbd4a50ce90173949f56e9ed85856267471a992 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Mon, 28 Mar 2022 23:12:48 +0200 Subject: popup and callback works best --- public/client.html | 10 ++++++---- webAO/client.ts | 10 ++++++++-- 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 @@
-
+ data-ux_mode="popup" + data-callback="handleCredentialResponse" + data-nonce="" + data-auto_select="true"> + +
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 -- cgit