change state param

This commit is contained in:
Pete Matsyburka
2026-04-27 12:06:12 +03:00
parent a184fa11f1
commit 3fca76a716
2 changed files with 4 additions and 4 deletions
@@ -143,8 +143,8 @@
> >
<input <input
type="hidden" type="hidden"
name="state" name="oauth_data"
:value="oauthState" :value="oauthData"
autocomplete="off" autocomplete="off"
> >
<input <input
@@ -334,7 +334,7 @@ export default {
authenticityToken () { authenticityToken () {
return document.querySelector('meta[name="csrf-token"]')?.content return document.querySelector('meta[name="csrf-token"]')?.content
}, },
oauthState () { oauthData () {
const params = new URLSearchParams('') const params = new URLSearchParams('')
params.set('redir', document.location.href) params.set('redir', document.location.href)
+1 -1
View File
@@ -228,7 +228,7 @@ export default {
'https://www.googleapis.com/auth/userinfo.email', 'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/drive.file' 'https://www.googleapis.com/auth/drive.file'
].join(' '), ].join(' '),
state: new URLSearchParams({ oauth_data: new URLSearchParams({
redir: `/templates/${this.templateId}/edit?google_drive_open=1` redir: `/templates/${this.templateId}/edit?google_drive_open=1`
}).toString() }).toString()
} }