From 98a4fbb96e372e878e968e0f9d661ff1080754bd Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 22 Sep 2019 15:12:45 -0700 Subject: [PATCH] fix: attempt to fix Safari login bug (#1510) --- src/routes/_actions/addInstance.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes/_actions/addInstance.js b/src/routes/_actions/addInstance.js index 64deb30d..8e4344d3 100644 --- a/src/routes/_actions/addInstance.js +++ b/src/routes/_actions/addInstance.js @@ -40,7 +40,10 @@ async function redirectToOauth () { instanceData.client_id, REDIRECT_URI ) - document.location.href = oauthUrl + // setTimeout to allow the browser to *actually* save the localStorage data (fixes Safari bug apparently) + setTimeout(() => { + document.location.href = oauthUrl + }, 200) } export async function logInToInstance () {