Skip to content

Commit

Permalink
call onRefresh after code is exchanged
Browse files Browse the repository at this point in the history
The name `onRefresh` is suddenly less accurate, but you definitely want
this logic to run on all authentication responses.
  • Loading branch information
cmatheson committed Aug 9, 2024
1 parent 1ffef9b commit d67d8b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/create-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export async function createClient(
if (authenticationResponse) {
_authkitClientState = "AUTHENTICATED";
setSessionData(authenticationResponse, { devMode });
_onRefresh && _onRefresh(authenticationResponse);
onRedirectCallback({ state, ...authenticationResponse });
}
} catch (error) {
Expand Down

0 comments on commit d67d8b3

Please sign in to comment.