From a4cd121ef6aca017519887bb9dac154dff463a6b Mon Sep 17 00:00:00 2001 From: Cameron Matheson Date: Fri, 9 Aug 2024 15:46:55 -0600 Subject: [PATCH] schedule proactive refreshes after code is exchanged --- src/create-client.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/create-client.ts b/src/create-client.ts index f9ead7c..3361c22 100644 --- a/src/create-client.ts +++ b/src/create-client.ts @@ -193,6 +193,7 @@ export async function createClient( if (authenticationResponse) { _authkitClientState = "AUTHENTICATED"; + _scheduleAutomaticRefresh(); setSessionData(authenticationResponse, { devMode }); _onRefresh && _onRefresh(authenticationResponse); onRedirectCallback({ state, ...authenticationResponse });