User Based Local Storage

Does anyone have a preferred way to store a users oauth tokens locally on the client? I do not want them passing to the server. Since the user would login to the website, have been trying to figure out the best way to have a user based local storage that persists.

GroundDB provides a collection interface to LocalStorage but any thoughts on how to encrypt the tokens so they are only accessible to the logged in user?