DAvid
DAvid
KKinde
Created by DAvid on 7/15/2024 in #💻┃support
Nuxt with Prisma ORM and Kinde Auth
Hi @Oli - Kinde thank you for getting back to me - I have tried to apply some of your advice today, but with no success. 'In the Nuxt module, you can get these details using $auth.user object - see here' Will this work on the server side before initial page load? - I thought this was just for the front end? 'In the TypeScript SDk, you can get these details using the getUserProfile helper function: - see here' Can i install @kinde-oss/kinde-typescript-sdk into the Nuxt template and get this working? If so will what import statement should I use, as I couldnt see in the docs. Alternatively, you can use the @kinde/management-api-js from the Kinde API in your server, to get user details. Can I use this inside my nuxt template to get details of an authenticated user also? Thanks for your help
8 replies
KKinde
Created by DAvid on 7/15/2024 in #💻┃support
Nuxt with Prisma ORM and Kinde Auth
@Oli - Kinde Do you have any update on this please?
8 replies
KKinde
Created by DAvid on 7/15/2024 in #💻┃support
Nuxt with Prisma ORM and Kinde Auth
@Oli - Kinde thanks for the update. Hopefully if there's a simple way to access user info from the server side in TypeScript, this can be used for other ORMs and TS based SDKs also. Thanks!
8 replies
KKinde
Created by DAvid on 5/15/2024 in #💻┃support
Nuxt DB connection
Thanks Oli, I would appreciate that. I have since been able to set up a Next.JS app with Prisma using this tutorial - https://kinde.com/blog/engineering/set-up-a-nextjs-app-with-prisma-orm-and-kinde-auth/ I just want to do the same with Nuxt and possibly some other frameworks too. Thanks!
9 replies
KKinde
Created by DAvid on 5/15/2024 in #💻┃support
Nuxt DB connection
@Peter (Kinde) a quick update - I have made some progress using Kinde's AI tool here https://discordapp.com/channels/1070212618549219328/1248317289095233568/1248345290952544267 However its recommending import { getKindeServerSession } from '@kinde-oss/kinde-auth-nuxt/server'; which doesn't exist in the Nuxt SDK
9 replies
KKinde
Created by DAvid on 5/15/2024 in #💻┃support
Nuxt DB connection
@Peter (Kinde) I looked into webhooks... I can see they provide events (user created, organisation created etc) how I can sync user data (as below) with my database? { id: "kp_12345556666", given_name: "Sally", family_name: "Smith", email: "[email protected]", picture: "https://lh3.googleusercontent.com/a/1234", updated_at: 1697769735 } I have also looked at https://kinde.com/api/docs/#authentication GET /oauth2/user_profile - but I understand I need a token for this - could I get that from the webhook? My goal is to use Kinde to a) filter any other data I add to my database by user to show on page load b) make sure the six fields above are synced
9 replies