nuxt-auth
nuxt-auth copied to clipboard
Basic authentication with no access token in response for local provider
Describe the feature
The backend I am working with Traccar does not return an access token in the response and token is generated via another request.
How to override token: { signInResponseTokenPointer: '/token/accessToken' }, in this senario for local provider?
How would you implement this?
No response
Additional information
- [ ] Would you be willing to help implement this feature?
Provider
- [ ] AuthJS
- [X] Local
- [ ] Refresh
- [ ] New Provider
Hi @idesignzone 👋
If the token is returned in a different format then the current default you can use a json pointer to find it!
// nuxt.config.ts
{
auth: {
token: {
signInResponseTokenPointer: '/get/pointer/here'
}
}
}
Read more: https://sidebase.io/nuxt-auth/configuration/nuxt-config
If it is returned via a different url, you may have to look into making a custom api you can call to signin + return the accessToken. You could do this inside the ~/server/api directory.