From bcd91851d28a8e91be24adfcac6e73af53159383 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 20 May 2023 10:08:41 +0800 Subject: [PATCH] Must decode the code! --- src/app.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app.jsx b/src/app.jsx index 63357bff..0d303bbb 100644 --- a/src/app.jsx +++ b/src/app.jsx @@ -91,7 +91,9 @@ function App() { useEffect(() => { const instanceURL = store.local.get('instanceURL'); - const code = (window.location.search.match(/code=([^&]+)/) || [])[1]; + const code = decodeURIComponent( + (window.location.search.match(/code=([^&]+)/) || [, ''])[1], + ); if (code) { console.log({ code });