-
-
Notifications
You must be signed in to change notification settings - Fork 183
Description
Context
using nuxt-auth with local external provider and my external API demans an 'ApiKey' header to authorize any request to be made.
So far i was unable to find a way to had custom header to the endpoints defined in nuxt-auth config, Is there any way to do this?
Already tried creating plugin trying to "catch" fetch request and manually add header but does not seem to work with fetch call made by nuxt-auth.
Describe the feature
Possibility to add request headers to defined endpoints.
How would you implement this?
Add another prop do the object that defines endpoint like:
endpoints: { signIn: { path: 'login', method: 'post', headers: { ... } }, signOut: { path: 'logout', method: 'post', headers: { ... } }, signUp: { path: 'register', method: 'post', headers: { ... } }, getSession: { path: 'session', method: 'get', headers: { ... } }, }
Additional information
- Would you be willing to help implement this feature?
Provider
- AuthJS
- Local
- Refresh
- New Provider