change state param
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user