Comments (7)
As much as I would like this, I don't think that we should rip apart the NuxtAuthHandler
config -> from that point onwards the advantage of having many guides, tutorials, ... from NextAuth that also apply to nuxt-auth
vanishes.
If we could import from the server side from our client-code it may be something different. Our middleware could import the auth handler and try to read the configuration from it. But ofc. that's also super dangerous because the nuxt auth handler could also contain secrets.
from nuxt-auth.
As much as I would like this, I don't think that we should rip apart the NuxtAuthHandler config -> from that point onwards the advantage of having many guides, tutorials, ... from NextAuth that also apply to nuxt-auth vanishes.
Yeah, that's exactly my point.
from nuxt-auth.
Yeah, I also thought about having path matching with next-auth pages. But we can't import the auth options as they are defined by the user in [...].ts
, so we would need to add the auth.pages
to nuxt.config
and merge them into NuxtAuthHandler
.
from nuxt-auth.
So your idea is something like ignorePaths: ['/foo', '/bar']
, right?
from nuxt-auth.
Yes, that's it! I haven't looked into it, but it would be nice to follow the same patterns that nitro uses for routeRules
: https://nitro.unjs.io/config/#routerules
Maybe the naming can be publicPaths
instead of ignorePaths
? This naming would be more independent of the global-middleware context. Or maybe even better, restructure the global middleware settings to allow:
enableGlobalAppMiddleware: boolean | {
enabled: boolean
ignoresPaths: string[]
}
from nuxt-auth.
I've added this note to the new docs, see #90 and soon https://sidebase.io/nuxt-auth/application-side/custom-sign-in-page
I've moved my proposal to allow ignore Paths into #91.
Closing this via #90
from nuxt-auth.
This was added with #90
from nuxt-auth.
Related Issues (20)
- addDefaultCallbackUrl for local auth not working HOT 2
- Refresh token does not refresh the token HOT 4
- switched from local to refresh and got a 404 HOT 1
- auth state lost after a page redirection and return back on website HOT 3
- [next-auth][error][OAUTH_CALLBACK_ERROR] with FacebookProvider HOT 2
- Refresh provider collection issue HOT 3
- Custom refresh token name. HOT 9
- Refresh provider not working HOT 6
- yarn dev get failed but pnpn run dev works HOT 2
- Invalid Cookie name
- replace auth origin in runtime to enable usage with cloudlfare tunnels HOT 3
- signIn with callbackUrl: undefined returns an error instead of navigating to the previous page HOT 7
- Ability to specify domain for cookie
- Remove VueUse dependency if it's not necessary
- Custom Session Data for CredentialsProvider is broken HOT 2
- JWE Initialization Vector missing or incorrect type HOT 6
- redirect_uri is always http://localhost:3000 HOT 6
- Cannot set redirect_uri for Google authentication provider HOT 2
- Getting an AUTH_NO_ORIGIN on PM2 instance HOT 7
- Warning on Build: Dynamic and Static Import Conflict HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nuxt-auth.