mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 03:08:34 +00:00
Encode state to base64 to pass to oauth
This commit is contained in:
parent
03c9fd36b3
commit
cf03fb784d
1 changed files with 6 additions and 2 deletions
|
|
@ -210,11 +210,15 @@ export default class Google extends Plugin {
|
|||
* Render user authentication view
|
||||
*/
|
||||
renderAuth () {
|
||||
const link = `${this.opts.host}/connect/google?state=${location.href}`
|
||||
const state = btoa(JSON.stringify({
|
||||
redirect: location.href
|
||||
}))
|
||||
|
||||
const link = `${this.opts.host}/connect/google?state=${state}`
|
||||
return yo`
|
||||
<div class="UppyGoogleDrive-authenticate">
|
||||
<h1>You need to authenticate with Google before selecting files.</h1>
|
||||
<a href=${link}>Authenticate</a>
|
||||
<a href=${link} target="_blank">Authenticate</a>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue