diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-28 23:12:48 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-03-28 23:12:48 +0200 |
| commit | 8bbd4a50ce90173949f56e9ed85856267471a992 (patch) | |
| tree | c8ac219a3774f19d536135e14f78a491e8b353f4 | |
| parent | 1285a83a3bac725423c24eb248ef54747ad005f5 (diff) | |
popup and callback works best
| -rw-r--r-- | public/client.html | 10 | ||||
| -rw-r--r-- | 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 @@ <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 |
