Popular javascript clients extended with functionality to deal with Okta and Cognito auth more easily.
The respective packages above both provide a function that generates clients.
With some basic config passed in, these clients can:
- attach idTokens to all requests
- fetch new idTokens when only a refreshToken is valid
- store and retrieve tokens in localStorage (but can be overridden)
- handle entire auth flow automatically (but it provides a convenience function for that)
- handle when idToken and refreshToken are both invalid
- write tests?
- maybe consider making this lib more of one that decorates axios or apollo instead of makes new opinionated clients for you...?
- if an token is not valid and refresh token can't retrieve a new idtoken, handle?
- does this really have anything to do with Okta anymore?