Keeping user logged in between browser refreshes (or: how to stringify authClient/agent/actor)

Your identity can be serialized to JSON - DelegationChain.toJSON. However, serializing it to and from IndexedDb is already handled for you automatically.

The generic flow applications should use is:

  • AuthClient.create
  • Check if authenticated
    • If so, create actor using identity
  • Login
    • Create actor using identity
2 Likes