logto-io / js

🤓 Logto JS SDKs.
https://docs.logto.io/quick-starts/
MIT License
67 stars 40 forks source link

refactor(client): reuse getAccessToken promise #575

Closed gao-sun closed 1 year ago

gao-sun commented 1 year ago

Summary

reuse getAccessToken() Promise when there's an ongoing one to avoid multiple calls to the server

Testing

added unit tests, also tested locally

Checklist