Comments (6)
@slayt12 @kelvinyelyen thanks for the great feedback. We can also look at updating the provided components to have a client side version. I'll add an issue to track this work
from kinde-auth-nextjs.
Hey @slayt12, thanks for raising this - I'd love to get it sorted for you.
I haven't been able to reproduce it so just a few follow up questions to narrow this down:
- is this happening in all browsers?
- What version of NextJS are you using?
from kinde-auth-nextjs.
Thanks for getting back to me:
NextJS Version 13.4.19
Currently using Brave browser. Also tried with firefox.
from kinde-auth-nextjs.
Hey @slayt12, I just re-read your issue which is making more sense to me now.
If you take a look at the markup for LoginLink you'll see it uses an HTML <a>
tag under the hood. This is because the NextJS <Link>
component does some prefetching where it calls Kinde ahead of time, which starts an auth session, this means when the browser fully redirects to Kinde it appears like you're a second user trying to hijack the first session and therefore doesn't allow you to authenticate.
We will update our docs to explain this more clearly. Is using either our provided links or a raw a
tag a blocker for you?
from kinde-auth-nextjs.
Yeah with the Kinde Login/out/register provided buttons being server side components, it doesn't play well with interactive login buttons. Creating a custom button that directs it to the api directory is needed. I don't have an issue using a raw tag.
from kinde-auth-nextjs.
I’ve faced similar complexities when integrating the provided tags (SSCs) within client-side components. It’s promising to witness documentation improvements in response to these challenges. Employing custom buttons or raw tags for interactions with the auth routes have proved effective for me.
from kinde-auth-nextjs.
Related Issues (20)
- Bug: post_logout_redirect_url after /api/auth/logout does not redirect to specified url HOT 1
- middleware publicPaths is not configurable, middleware always does an auth check HOT 3
- Documentation issue: (How to get specific user roles by their id) HOT 1
- Bug: Broken type exports since 2.2.2 HOT 5
- Bug: Property 'login' does not exist on type 'KindeState' HOT 2
- Bug: organization, getOrganization returning string instead of KindeOrganization HOT 2
- Bug: module augmentation fails due to how library publishes types
- Bug: Error: Cannot get user details, no authentication credential found HOT 3
- Bug: user cookie is not set properly on callback, causing error on middleware HOT 7
- Bug: middleware with withAuth does not work: TypeError: Cannot read properties of undefined (reading 'value') HOT 2
- refreshTokens in Next.js results in ReferenceError: config is not defined HOT 2
- Bug: TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_0__.createContext) is not a function HOT 2
- Bug: Error 500 on production HOT 8
- Bug: `/api/auth/setup` is failing with 401 Unauthorized HOT 7
- Bug: 405 method not allowed - Middleware + handler don't handle non-GET requests gracefully HOT 1
- Bug: No support for expired sessions HOT 9
- Getting 500 response after login redirect HOT 4
- I can't create user and organization by `createKindeManagementAPIClient`. HOT 5
- Bug: getUser function not returning a username property HOT 3
- Bug: getRoles return null even I've set role for user HOT 3
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 kinde-auth-nextjs.