After perform login with SDK.auth.login method, it does login properly and show the login activity in the Admin App as well, however no item can be find in Local Forage.
Setup is
new DirectusSDK('URL', {
storage: localforage,
mode: 'json'
})
Using V9RC21 js sdk
Currently storage is only used for storing directus_refresh_token in json mode. There is no caching in sdk
Plus that setup is nested under auth:
new DirectusSDK('URL', { auth: { storage: localforage, mode: 'json' }})
Plus that setup is nested under
auth:new DirectusSDK('URL', { auth: { storage: localforage, mode: 'json' }})Thanks!! Working now, Should also fix the document code sample.
It currently written as.
const directus = new DirectusSDK('https://api.example.com', { storage: localforage });
https://docs.directus.io/reference/sdk-js.html#installation
Thanks @altezza04 — example updated!