KHRM
Explore posts from serversKKinde
•Created by KHRM on 4/11/2024 in #💻┃support
useKindeBrowserClient shows error
Hello,
I am using the useKindeBrowser client to recieve the
however when i am not logged in on the home page there is an error shown in the console.log is this intended behavior?, i just started my project and it already feels wrong haha (error is not shown if i am logged in)
isAuthenticated
property
"use client";
import { useKindeBrowserClient } from "@kinde-oss/kinde-auth-nextjs";
import { LoginLink } from "@kinde-oss/kinde-auth-nextjs/components";
import Link from "next/link";
import { Button } from "@/components/ui/button";
export const GetStartedBtn = () => {
const { isAuthenticated } = useKindeBrowserClient();
return (
<Button variant="secondary" size="lg" asChild>
{isAuthenticated ? (
<Link href="/journal">Get Started</Link>
) : (
<LoginLink postLoginRedirectURL="/login/redirect">
Get Started
</LoginLink>
)}
</Button>
);
};
"use client";
import { useKindeBrowserClient } from "@kinde-oss/kinde-auth-nextjs";
import { LoginLink } from "@kinde-oss/kinde-auth-nextjs/components";
import Link from "next/link";
import { Button } from "@/components/ui/button";
export const GetStartedBtn = () => {
const { isAuthenticated } = useKindeBrowserClient();
return (
<Button variant="secondary" size="lg" asChild>
{isAuthenticated ? (
<Link href="/journal">Get Started</Link>
) : (
<LoginLink postLoginRedirectURL="/login/redirect">
Get Started
</LoginLink>
)}
</Button>
);
};
✓ Compiled in 232ms (1085 modules)
Error: Cannot get user details, no authentication credential found
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:166:31)
at step (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:50:23)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:31:53)
at fulfilled (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:22:58)
Error: Cannot get user details, no authentication credential found
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/@kinde-oss+kinde-typesc...
✓ Compiled in 232ms (1085 modules)
Error: Cannot get user details, no authentication credential found
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:166:31)
at step (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:50:23)
at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:31:53)
at fulfilled (webpack-internal:///(rsc)/./node_modules/.pnpm/@[email protected]/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/clients/server/authorization-code.js:22:58)
Error: Cannot get user details, no authentication credential found
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/@kinde-oss+kinde-typesc...
2 replies