Confusion about using user vuex, apollo and NuxTjs/auth-module altogether. #1467
Replies: 1 comment
-
I'm using django-graphql-auth with django-graphql-jwt 0.3.1 and implemented a custom scheme handler to use nuxt apollo and that backend, thinks are work in progress but I would like some comment about this implementation, for now it handles login, token refresh, logout and token invalidation, in builds upon refresh.ts scheme on auth-next ("@nuxtjs/auth-next": "5.0.0-1622918202.e815752",). For example things like tokenRequired could probably be removed. login is handled with
nuxt.config.js
~/plugins/auth.js (handles i18n redirect)
~/graphql/mutations/login.gql
~/graphql/mutations/refresh_token.gql
~/graphql/mutations/revoke_token.gql
~/graphql/queries/me.gql
~/plugins/apollo-scheme.js
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Version
auth: 4.9.1
axios: 5.12.2
nuxt: 2.14.6
Nuxt configuration
mode:
[ X ] universal
spa
###nuxt.config.js
Sorry for noob confusion I am totally lost while reading documentations. I am new to coding with NuxtJS area and I am confused about JWT authentication using Django-graphql-jwt and making it usable in frontend. I use vuex and I have created a Login function:
Now Login function works but when I follow the NuxtJs auth documentation, I tried to create a strategy:
How do I use this token similar to, $auth.loggedIN ?
Beta Was this translation helpful? Give feedback.
All reactions