nuxt-community / universal-storage-module

Universal Storage Utilities for Nuxt 2
MIT License
276 stars 15 forks source link

how to get session data server side(middleware) #189

Open mustafa05deniz opened 2 years ago

mustafa05deniz commented 2 years ago

Hi, I needed to access session information from the server side for a situation, but I couldn't find how to do it.

middleware({ app, redirect}) { const token = app.$storage.getUniversal('accessToken') if (!token) { return redirect('/')}}

i need to get data from session like this,

app.$storage.getSession('accessToken')

Is there any way to read this data from server side.

MarioBozhikov commented 1 year ago

Hello i like to know how you did it ?