Skip login page, when using middleware. #4511
Replies: 24 comments 1 reply
-
I am also in need of such as feature as middleware is so elegant - shame it forces a redundant login page |
Beta Was this translation helpful? Give feedback.
-
not the best option but at least it works |
Beta Was this translation helpful? Give feedback.
-
+1 especially now with server components this is something really important to have in next auth. I think also something quite simple, like: |
Beta Was this translation helpful? Give feedback.
-
This is an important feature. Yes. But there's no point of spamming the thread with |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Description 📓
Hey,
The logic to directly access a provider and skip the login page is perfectly clear in the docs , when using the client-side hook.
However, for those who implemented the authentication check with the middleware, there isn'n a clean solution.
The only way to do that seems to be recreating an entire login page (which will never be seen by users) and implement the front-end solution from the docs here.
It seems to me that there should be a cleaner way to do that, especially since the middleware one-liner solution is so simple and elegant :
export { default } from 'next-auth/middleware';
How to reproduce ☕️
An example of what it could like in the providers config ?
Contributing 🙌🏽
No, I am afraid I cannot help regarding this
Beta Was this translation helpful? Give feedback.
All reactions