The identity should already be stored in the browser. The default used to be local storage but now it’s IndexedDB.
This thread might help: Keeping user logged in between browser refreshes (or: how to stringify authClient/agent/actor) - #4 by paulyoung