opencampus-xyz / ocid-connect-js

official SDK for connect with OCID
6 stars 6 forks source link

Add CookieStorageManager to use Cookie as storage mechanism #2

Closed jackyquang closed 3 months ago

jackyquang commented 3 months ago

This PR add a new Storage Manager - CookieStorageManager that uses Cookie instead of localStorage as the store for transaction and tokenManager.

There is a demand of cross domain storage and local storage is a little bit tricky.

Set opts.storageType to 'cookie' to enable cookie storage Set opts.cookieDomain to the domains that you want to store. Leave it blank and it will use the current domain.

jackycani commented 3 months ago

look good to me - approved.