Closed ttonyh closed 5 months ago
Here's my config if it helps:
{
rewriteRedirects: true,
watchLoggedIn: true,
fullPathRedirect: true,
redirect: {
login: '/sign-in',
logout: '/',
home: '/'
},
stores: {
pinia: {
enabled: false
},
localStorage: {
prefix: `${storagePrefix}auth_`
},
cookie: {
prefix: `${storagePrefix}auth_`,
options: {
path: '/'
}
}
},
strategies: {
local: {
scheme: 'refresh',
token: {
property: 'tokenPair.access',
type: 'Bearer',
global: true
},
refreshToken: {
property: 'tokenPair.refresh',
data: 'refresh'
},
user: {
property: 'user'
},
endpoints: {
logout: false,
login: {
url: `${SERVER_BASE_URL}/v1/auth/login/`,
method: 'post',
credentials: 'include'
},
refresh: {
url: `${SERVER_BASE_URL}/v1/auth/refresh/`,
method: 'post',
credentials: 'include'
},
user: {
url: `${SERVER_BASE_URL}/v1/user/`,
method: 'get',
credentials: 'include'
}
}
}
}
}
try using @nuxt-alt/auth@beta
Using BETA: 3.1.5-beta.4
getting the same result.
okay update the the beta tag again and try again. I've decoupled the request from forwarding previous headers.
Using version 3.1.5-beta.5
still getting same error.
Use the http module options and enable debugging and post the output.
Environment
Build Modules: -
Nuxt Config
N/A
Reproduction
Call the loginWith method on the strategy.
Describe the bug
Upgrading from @nuxt-alt/auth
3.0.5
to3.1.4
causes the auth to call a local method (in Nuxt) that calls the endpoint, which returns a 415 error ofUnsupported media type application/x-www-form-urlencoded;charset=UTF-8 in request
. Digging though the auth source, I noticed that there's a config nameduseForms
that changes the content-type header. I tried to apply this option, both in the root of the config and inside of the strategy and I still get the same result.Additional context
No response
Logs
No response