agr
agr
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
Thanks, that works now!
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
@Daniel_Kinde any thoughts on this?
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
{
"apiPath": "/api/auth",
"redirectURL": "http://localhost:3000/api/auth/kinde_callback",
"postLoginRedirectURL": "http://localhost:3000",
"issuerURL": "https://frontline100.kinde.com",
"clientID": "20e0842cffa94b87aa74c98f88ad312f",
"clientSecret": "Set correctly",
"postLogoutRedirectURL": "http://localhost:3000",
"audience": "",
"logoutRedirectURL": "http://localhost:3000"
}
{
"apiPath": "/api/auth",
"redirectURL": "http://localhost:3000/api/auth/kinde_callback",
"postLoginRedirectURL": "http://localhost:3000",
"issuerURL": "https://frontline100.kinde.com",
"clientID": "20e0842cffa94b87aa74c98f88ad312f",
"clientSecret": "Set correctly",
"postLogoutRedirectURL": "http://localhost:3000",
"audience": "",
"logoutRedirectURL": "http://localhost:3000"
}
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
Sure
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
Tried upgrading to 2.4.5-0 and also adding wrapping the app in the KindeProvider which I realised was missing before (though shouldn't make any difference as this is a server-rendered page) but getIdToken is still returning null 😦
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
@Daniel_Kinde still no luck I'm afraid
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
But decoding the token does not seem to work
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
Which is the same as what is returned by getRawIdToken
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
Yes there is an encoded id_token cookie
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
No description
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
I get this using the nextjs app router starter kit out of the box and just adding the getIdToken call into the dashboard page as follows:
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";

export default async function Dashboard() {
const session = getKindeServerSession();
const accessToken = await session.getAccessToken();
const rawIdToken = await session.getIdTokenRaw();
const idToken = await session.getIdToken();
return (
<div className="container">
<div className="card start-hero">
<p className="text-body-2 start-hero-intro">Woohoo!</p>
<p className="text-display-2">
Your authentication is all sorted.
<br />
Build the important stuff.
</p>
<p>Access Token</p>
<pre>
{JSON.stringify(accessToken, null, 2)}
</pre>
<p>Raw ID Token</p>
<pre>
{rawIdToken}
</pre>
<p>ID Token</p>
<pre>
{JSON.stringify(idToken, null, 2)}
</pre>
</div>
<section className="next-steps-section">
<h2 className="text-heading-1">Next steps for you</h2>
</section>
</div>
);
}
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";

export default async function Dashboard() {
const session = getKindeServerSession();
const accessToken = await session.getAccessToken();
const rawIdToken = await session.getIdTokenRaw();
const idToken = await session.getIdToken();
return (
<div className="container">
<div className="card start-hero">
<p className="text-body-2 start-hero-intro">Woohoo!</p>
<p className="text-display-2">
Your authentication is all sorted.
<br />
Build the important stuff.
</p>
<p>Access Token</p>
<pre>
{JSON.stringify(accessToken, null, 2)}
</pre>
<p>Raw ID Token</p>
<pre>
{rawIdToken}
</pre>
<p>ID Token</p>
<pre>
{JSON.stringify(idToken, null, 2)}
</pre>
</div>
<section className="next-steps-section">
<h2 className="text-heading-1">Next steps for you</h2>
</section>
</div>
);
}
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
Yep - also tried on private browser
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
In this example, rawIdToken has a value but idToken is null
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
I am simply doing
const session = await getKindeServerSession();
const rawIdToken = await session.getRawIdToken();
const idToken = await session.getIdToken();
const session = await getKindeServerSession();
const rawIdToken = await session.getRawIdToken();
const idToken = await session.getIdToken();
24 replies
KKinde
Created by agr on 10/28/2024 in #💻┃support
getIdToken error
Sure - I had the same problem with the latest version 2.4.3 and the version in the NextJS starter kit which is 2.3.10
24 replies
KKinde
Created by readme on 10/28/2024 in #💻┃support
Next.js Refresh Token null
I'm having the same issue!
7 replies
TtRPC
Created by StefanWallin on 3/7/2024 in #❓-help
What's the best practices around tRPC to negotiate API-versions?
@StefanWallin did you find a solution to this? I'm interested in tackling the same problem
5 replies