Giter VIP home page Giter VIP logo

Comments (6)

DaveOrDead avatar DaveOrDead commented on August 24, 2024 2

@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.

DaveOrDead avatar DaveOrDead commented on August 24, 2024

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:

  1. is this happening in all browsers?
  2. What version of NextJS are you using?

from kinde-auth-nextjs.

slayt12 avatar slayt12 commented on August 24, 2024

Thanks for getting back to me:
NextJS Version 13.4.19
Currently using Brave browser. Also tried with firefox.

from kinde-auth-nextjs.

DaveOrDead avatar DaveOrDead commented on August 24, 2024

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.

slayt12 avatar slayt12 commented on August 24, 2024

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.

kelvinyelyen avatar kelvinyelyen commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.