Skip to content

What is the strategy for extending a users session? #284

@Maximus-5

Description

@Maximus-5

I'm new to Nuxt and Directus

My main question is does Nuxt-Directus have a strategy or recommendation for extending the session?

I've tried the directus sdk and found it left managing the directus session to the developer (I think....)

This is the second time I've tried nuxt-directus in my code, login and logout works but automatic logout happens after about 15 minutes.

Can we extend the session inside middleware?
Right now I'm using something like this:

//MyPage.vue
<script setup>
const { refreshTokens } = useDirectusToken();
refreshTokens()

this is being done in the Vue file, which I feel is not ideal, but for some reason this code did not function properly in middleware.

Thanks for reading.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions