#SDK 11 Authentication Storage

3 messages · Page 1 of 1 (latest)

shrewd current
#

I'm looking into migrating to the new SDK and hit my first hurdle with authentication. I'm able to submit credentials and return access/refresh_tokens. However, I'm unsure of how to manage the "storage" configuration to pass and retrieve information from a cookie. This component seemed to be handled automatically with the "old" SDK.

I'm using Next.js, tried using cookies-next to set/get but no luck.

Any help would be greatly appreciated.

slender kelpBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please help us help you making sure you:

  • Adding an explanation of exactly what you're trying to achieve.
  • Adding any and all related code or previous attempts.
  • Describing the exact issue or error you are facing.
  • Posting any screenshots if applicable.
  • Reading through https://stackoverflow.com/help/how-to-ask.

When you're done with this thread, please close it. Thanks! ✨

(If you have a support agreement and need help, please contact the core team via email.)

wise mirage
#

I have the same problem even though I use Nuxt 3. Previously I used a new storage class to extend the previous BaseStorage. This doesn't work at all now with the new SDK.

I have tried to remake the example shown at https://bebity.medium.com/new-directus-sdk-auth-local-storage-116fc57d8a3b and save AuthenticationData as cookie but no luck. It would be desirable to have some more examples describing how this should be done with the new SDK in the documentation.

Medium

With the release of Directus 10.5.1, the open-source platform continues to make strides. The standout feature of this update is undoubtedly…