Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useKindeClient incorrect type #74

Open
devniza opened this issue Mar 20, 2024 · 0 comments
Open

useKindeClient incorrect type #74

devniza opened this issue Mar 20, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@devniza
Copy link

devniza commented Mar 20, 2024

I've been attempting to access the user login state in the script tag, rather than relying on $auth which is only available in the template tag.

ISSUE
When importing useKindeClient and attempting to use it in the script tag, it produces a warning that it is an any tag.
image
(Nuxt Auto imports useKindeClient)

Additionally, assigning useKindeClient to a variable named client and using it to access the isloggedin method returns an any type.

SOLUTION
After researching with the assistance of @DanielRivers from the Kinde Discord Server, I concluded that importing useAuth instead of useKindeClient is the correct approach. This has the appropriate type and enables you to utilize the loggedIn method to verify whether the user is logged in.

image
image
(According to this ^)

REQUEST
Please add a type to the useKindeClient function. 😅

@maige-app maige-app bot added bug Something isn't working enhancement New feature or request labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant