workos / authkit-js

Vanilla JS AuthKit SDK
MIT License
9 stars 3 forks source link

make `refreshSession` private #27

Closed cmatheson closed 2 months ago

cmatheson commented 2 months ago

refreshSession shouldn't be called directly. Developers should call getAccessToken which refreshes the session as needed.

Removed the authkitClientState checks from refreshSession (this avoids issues like getAccessToken not refreshing when a concurrent refresh has already started. (More improvements to come for avoiding needless refreshes).