From cf03fb784dbdfefb2d8474922c78319072a5372c Mon Sep 17 00:00:00 2001 From: Harry Hedger Date: Thu, 19 May 2016 05:22:07 -0400 Subject: [PATCH] Encode state to base64 to pass to oauth --- src/plugins/GoogleDrive.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/GoogleDrive.js b/src/plugins/GoogleDrive.js index f83b71031..8e22943b1 100644 --- a/src/plugins/GoogleDrive.js +++ b/src/plugins/GoogleDrive.js @@ -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`

You need to authenticate with Google before selecting files.

- Authenticate + Authenticate
` }