Replies: 2 comments
-
Each endpoint is used to make requests using axios. They are basically extending Axios Request Config. https://auth.nuxtjs.org/schemes/refresh#endpoints So basically you can do:
|
Beta Was this translation helpful? Give feedback.
-
@Sovai, i think you need some custom middleware or vuex mutation that plugged to nuxt-auth to post encrypted key and get the user data, endpoint on the config can only do one method at the moment. cmiiw.
@alanaasmaa, can we
|
Beta Was this translation helpful? Give feedback.
-
Hi, I wonder if I can have body for POST request for user field? Because of security purpose, to get user profile, I have to pass encrypted fields but the auth module doesn't seem to support passing body with POST request.
I have my local strategy setup in nuxt.config like this
auth: { strategies: { local: { token: { property: 'access_token', global: true, }, user: { property: 'profile', }, endpoints: { login: { url: '/token', method: 'get' }, logout: false, user: { url: '/user/profile', method: 'post' }, }, }, }, redirect: { login: '/login', logout: '/', callback: '/login', home: '/', }, },
Beta Was this translation helpful? Give feedback.
All reactions