Welcome to the Kinde community

Updated last year

Some thoughts after reading the nuxt

Some thoughts after reading the nuxt docs.

I feel a bit confused after trying to understand how to use your module to do SPA->API secure communication. I'm considering building a new project with vue, saw that vue sdk is being worked on. Which makes me think I should use nuxt in SPA mode since I don't really see the benefits of doing any SSR for this app. There is a heading "Get user information" that returns the user, but I'm left wondering if this is supposed to work on the client or during server render. Other parts of the documentation, like the JS SDK mentions a way to get an access token that I can then use in my API to verify auth to Kinde.

Side note, but the JSON under "User Profile" has some , that is missing at the end of the values 😉
1
d
O
m
8 comments
Hey @dersand,
Thanks for passing on this feedback on our fresh new Kinde Nuxt module. I'll pass thos feedback on and fix some that issue in the JSON on the docs.

On Monday, I will get my Nuxt expert team mate to answer your question on "Get user information" on client or server render.
i tried to use nuxt today. but it is giving error.

dev
nuxt dev

Nuxt 3.7.4 with Nitro 2.6.3 8:45:53 PM
8:45:54 PM
➜ Local: http://localhost:3000/
➜ Network: use --host to expose

➜ DevTools: press Shift + Option + D in the browser (v1.0.0) 8:45:55 PM

ℹ Vite client warmed up in 531ms 8:45:55 PM
✔ Nitro built in 302 ms nitro 8:45:56 PM
[nuxt] [request error] [unhandled] [500] Authentication flow state not found
at AuthorizationCode.exchangeAuthCodeForTokens (./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:66:19)
at async AuthorizationCode.handleRedirectFromAuthDomain (./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthCodeAbstract.js:36:24)
at async Object.handleRedirectToApp (./node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:55:9)
at <anonymous> (./node_modules/@nuxtjs/kinde/dist/runtime/server/api/callback.get.mjs:6:3)
at async Object.handler (./node_modules/h3/dist/index.mjs:1630:19)
at async Server.toNodeHandle (./node_modules/h3/dist/index.mjs:1840:7)
I am sorry if i am missing something.
i would love to learn and explore if there's something i should have done in the project.
Hey @malware_manu,
Ill pass this issue onto my team, and get back to you
Hey @dersand,
See the below comments:
  1. Does "Get user information" work on the client or during server render? - server render at the moment, we’ll likely extend to include client
  2. How can they get the access token in the Nuxt Module, which they can then use in their API to verify auth to Kinde? - This also hasn’t been built yet
  3. Guidance on how using Nuxt module to do SPA->API secure communication - I would suspect a Vue SDK would be a better fit for you when we have it as it would be client focussed, our other Vue founders are using the plain JavaScript SDK
@Oli - Kinde Legend. Thanks.
Hey @malware_manu I've just seen your GitHub issue I'll follow up over there - thanks for raising
Add a reply
Sign up and join the conversation on Discord