Skip to content

v0.3.3

Choose a tag to compare

@lucaswerkmeister lucaswerkmeister released this 27 Mar 12:13

Better state management.

  • Two changes are meant to make it easier to use m3api-oauth2 correctly: A new isCompleteOAuthSession() function is available, and initOAuthSession() is now idempotent. This should make it unnecessary for users of the library to track or deduce the current state of the authorization flow (i.e., whether initOAuthSession() was already called, and whether completeOAuthSession() was already called). If isCompleteOAuthSession() returns false, the user is not logged yet – call initOAuthSession() to get the authorization URL (it doesn’t matter if it was already called or not); if isCompleteOAuthSession() returns true, the user is logged in.
  • Updated dependencies.