fix: attempt to fix Safari login bug (#1510)

This commit is contained in:
Nolan Lawson 2019-09-22 15:12:45 -07:00 committed by GitHub
parent 41270f9210
commit 98a4fbb96e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,10 @@ async function redirectToOauth () {
instanceData.client_id, instanceData.client_id,
REDIRECT_URI 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 () { export async function logInToInstance () {