Konrad
Explore posts from serversKKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
it would be good if the middleware supported
lang
param out of the box47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
I ran the middleware code through claude to convert it to typescript 😎
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
ngl it took me a good 40-60mins
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
I override
loginPage
for /checkout
to point to register endpoint47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
what I did :
loginPage: pathWithoutLang === '/checkout' ? '/api/auth/register' : '/api/auth/login'
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
I also created a custom middleware that supports my i18n lib
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
I solved it 😫
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
But imo it’s common use case for better onboarding UX
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
This is not possible with sdk out of the box
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
As an example go to Shopify.com when you press „Start free trial” it redirects you to register
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
I think Peter here might know more about this
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
RegisterLink just redirects to register unconditionally and kinde doesn’t handle existing user session internally
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
Official SDK simply has no such feature but custom middleware will work fine thanks
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
I was referring to this code which obviously is incorrect as nextjs sdk has no such functions - only react sdk does. RegisterLink also ignores if user is already logged in. Customizing middleware or wrapping RegisterLink is the only way forward.
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
And „don’t have an account „ is not easy to see. I need to see how big sites like YouTube do it
47 replies
KKinde
•Created by Konrad on 7/25/2024 in #💻┃support
Redirect to register instead of login?
So I think UX is not good enough
47 replies