Welcome to the Kinde community.

A
A
A
M
T

useKindeClient returns null

Using the nuxt module for a while and wanted to implement custom login/sign-ups. For that as I understand I need to use the Kinde client (never used before on the frontend side).

Plain Text
const client = useKindeClient()

function test() {
  console.log(client) // used @click on a button and logs null
}


Also, the type returned by the useKindeClient composable is any, that seems super wrong to me.

Have a great day, Colin.

PS: Here is a link to my project repo (https://github.com/ColinEspinas/starter)
C
A
D
7 comments
Okay, just saw that the client was only available server side, meaning I can't use it to create a login button. Do I just have the option of call the rest API with query params?
Would you be open to add more utils to the nuxt module? I'll be open to contribute as I did some work on my side
Thanks for all the detail @Colin just be sure are you wanting to make use of Kinde custom signup/signin pages? https://docs.kinde.com/authenticate/custom-configurations/custom-authentication-pages/#_top

@Daniel_Kinde from our team will be able to take a deeper dive for you on Monday and he would love to have contribute to the Nuxt module if you are happy to help.
Thanks for your answer, yes I am looking to make custom signup/signin pages, I've read the guide already but I find it hard to get info on ''api/register'' and ''api/login'' parameters (I can't find them anywhere in the docs) I have used the types from the typescript sdk code for now.

I'll make sure to propose some stuff for the nuxt module that I find useful on my side
You can close this as I got things to work (except https://discord.com/channels/1070212618549219328/1231822023857148024) but this seems more like a feature request than a bug report
Hi @Colin Could you explain a little more what you're trying to achieve? There are some pre-build login buttons for example but you mention you're baking your own?

Just want to understand you reasoning
Hello,
I made my buttons when this was not yet a thing, I should probably swap to the premade ones, I sticked to mine as I made generic button components that could just call the kinde API when needed ("/api/login" and "/api/register"). But now that I tried implementing custom sign-in/up pages I should probably refactor as I can't find any docs for those endpoints.

I don't know if the lack of docs on those endpoints is voluntary as you want to rely on SDKs instead of API calls.
Add a reply
Sign up and join the conversation on Discord
Join