Pranay
Pranay
KKinde
Created by Pranay on 3/7/2025 in #💻┃support
jwtVerify from node express needs an audience
Got it. So I am generating the access token from React Native directly using:
import { useKindeAuth } from "@kinde/expo";

const loginResult = await kindeAuth.login({
orgCode: options?.orgCode,
audience: options?.audience
});
import { useKindeAuth } from "@kinde/expo";

const loginResult = await kindeAuth.login({
orgCode: options?.orgCode,
audience: options?.audience
});
But now when I try to login, my client shows an error message like this:
{"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Requested audience '84c4edc8aabd43b28f337a1e9af46688' has not been whitelisted by the OAuth 2.0 Client."}
{"error":"invalid_request","error_description":"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Requested audience '84c4edc8aabd43b28f337a1e9af46688' has not been whitelisted by the OAuth 2.0 Client."}
I can't figure out where on Kinde do I enable the audience paramter?
6 replies
KKinde
Created by Pranay on 3/6/2025 in #💻┃support
Kinde, Supabase, and React Native
Any thoughts on how to go about setting up the latter? @Ages
7 replies
KKinde
Created by Pranay on 3/6/2025 in #💻┃support
Kinde, Supabase, and React Native
This is the info I'm getting from GPT: In a client-side app like React Native, you’re not supposed to (and can’t) embed a secret. The “JWT secret” is a server‑side credential used to sign and verify tokens. In your case, Kinde issues a token without a client secret on the front end, so you need to adjust your Supabase backend to trust Kinde’s tokens rather than trying to regenerate or match a secret on the client. Here’s what you can do: Configure Supabase to Accept External Tokens: In your Supabase project settings (in the Supabase dashboard), you can configure custom JWT settings so that it validates tokens issued by an external provider like Kinde. If Kinde uses an RS256 signature, for example, you should use Kinde’s public key or a JWKS endpoint. This tells Supabase to trust the tokens coming from Kinde without needing to generate a new secret on the client side. Seems about right
7 replies
KKinde
Created by Pranay on 3/6/2025 in #💻┃support
Kinde, Supabase, and React Native
Hey @Ages , appreciate your quick reply. Are there any docs on this process. Stuck on the JWT verification via RLS policies. Any resources would help!
7 replies
KKinde
Created by Pranay on 3/6/2025 in #💻┃support
Kinde, Supabase, and React Native
Actually, React Native is a frontend app, so the client secret path doesnt work anyways from my understanding.
7 replies
KKinde
Created by Pranay on 12/28/2024 in #💻┃support
NextJS PWA app gets stuck at this screen
Okay did some testing by adding some logs: const { isAuthenticated } = getKindeServerSession(); console.log("crossed the getKinderSerevrAction line"); if (await isAuthenticated()) { console.log("in the if block of is auth on home"); redirect("/welcome"); } It seems like it gets stuck at the redirect block. @KindeAI
5 replies