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