Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make SDK offline first #1049

Closed
5 tasks
louischan-oursky opened this issue Mar 11, 2021 · 1 comment
Closed
5 tasks

Make SDK offline first #1049

louischan-oursky opened this issue Mar 11, 2021 · 1 comment
Assignees

Comments

@louischan-oursky
Copy link
Collaborator

louischan-oursky commented Mar 11, 2021

  • configure can be called more than once.
  • configure does NOT do network IO.
  • configure does local file IO.
  • Refresh access token lazily.
  • Review cookie and refresh token usage UX.
@mr9dollars mr9dollars added this to Focus on today in March 2021 Milestone Mar 31, 2021
@mr9dollars mr9dollars moved this from Focus on today to To do in March 2021 Milestone Apr 1, 2021
@mr9dollars mr9dollars moved this from To do to Focus on today in March 2021 Milestone Apr 7, 2021
@mr9dollars mr9dollars moved this from Focus on today to To do in March 2021 Milestone Apr 8, 2021
@mr9dollars mr9dollars removed this from To do in March 2021 Milestone Apr 8, 2021
@mr9dollars mr9dollars added this to To Do in April 2021 Milestone via automation Apr 8, 2021
@mr9dollars mr9dollars moved this from To Do to Focus on today in April 2021 Milestone Apr 9, 2021
@carmenlau
Copy link
Contributor

carmenlau commented Apr 12, 2021

API changes in the SDK

  • authgear.configure should not refresh access token, it will load SessionState will be updated based on refresh token store only. That means if there is refresh token, SessionState will be AUTHENTICATED. Validity of refresh token will not be verified during configure.
  • access token will be automatically refreshed when calling api that require auth, e.g. fetchUserInfo, enableBiometric...etc.
  • Add api to assist developer to call their app server with auth
    • iOS / Android / JS
      • authgear.refreshTokenIfNeeded() developer should call it before every api call
      • authgear.accessToken get the access token from authgear SDK and inject into their application request
      • authgear.clearSessionState() allow developer to clear SDK logged in state, when they find user session is invalid
    • JS (only)
      • authgear.fetch(...) access token will be automatically refresh
        • the fetch function will refresh access token if it is needed (SDK has refresh token but no valid access token). If refresh access token failed, the fetch function will be rejected and the developer app server will not be called.
      • breaking change, remove authgear.apiClient from public api. Before the update, developer called fetch function with authgear.apiClient.fetch, they should call it from authgear.fetch after update.

@mr9dollars mr9dollars moved this from Focus on today to In Progress in April 2021 Milestone Apr 12, 2021
@mr9dollars mr9dollars moved this from In Progress to Focus on today in April 2021 Milestone Apr 19, 2021
@mr9dollars mr9dollars moved this from Focus on today to To Do in April 2021 Milestone Apr 19, 2021
@mr9dollars mr9dollars moved this from To Do to In Progress in April 2021 Milestone Apr 27, 2021
@mr9dollars mr9dollars moved this from In Progress to Review In Progress in April 2021 Milestone Apr 28, 2021
@louischan-oursky louischan-oursky moved this from Review In Progress to Reviewer Approved in April 2021 Milestone May 3, 2021
April 2021 Milestone automation moved this from Reviewer Approved to Done May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

3 participants