Skip to content

Commit

Permalink
fix: refresh token only when necessary (#71)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed Feb 13, 2024
1 parent a336d3e commit 0a9d59b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/http_server/index_js.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ window.addEventListener("message", (event) => {
})
})
})
// auto reload to refresh token
// token is valid for 1 hour, refresh every 55 minutes by reloading
window.addEventListener("load", async () => {
setInterval(() => {
window.location.reload()
}, 60_000)
}, 1000 * 60 * 55)
})
// notify the SDK that the iframe is ready
Expand Down

0 comments on commit 0a9d59b

Please sign in to comment.