peteswah
peteswah
KKinde
Created by Sophia on 5/21/2024 in #💻┃support
How to refresh tokens in a Next.js client component?
Hey Sophia, there was a bug with refreshTokens that we've fixed up now. So if you call refreshTokens from a route handler or server action you should be good. If its from a page then it wont work!
14 replies
KKinde
Created by jixxywizzy on 6/24/2024 in #💻┃support
How to implement refresh token
If you are calling refreshTokens from a page, it will not work
6 replies
KKinde
Created by jixxywizzy on 6/24/2024 in #💻┃support
How to implement refresh token
In a route handler or server action get the refreshTokens function from getKindeSession
const {refreshTokens} = getKindeSession();
const {refreshTokens} = getKindeSession();
~ some data on the Kinde is changed (via API or UI) now call refreshTokens
await refreshTokens()
await refreshTokens()
and it should refresh.
6 replies
KKinde
Created by Sophia on 5/21/2024 in #💻┃support
How to refresh tokens in a Next.js client component?
One way to double check if refreshTokens is work would be to inspect the cookies after refreshTokens is called. Then if you have a look at the id_token or access_token and decode it here https://kinde.com/tools/online-jwt-decoder/ you should be able to see if your tokens now contain the up-to-date Kinde data. If it does have the data, then I think it could be trpc caching that may need to get invalidated (not 100% sure since I haven't used it before, but that would be my guess). If the data is not being updated in cookies I will have a deeper look into this! @Sophia
14 replies
KKinde
Created by IkiTg07 on 5/26/2024 in #💻┃support
Quick and Urgent about logout component
Logout Link if imported as above should work in both client and server components
3 replies
KKinde
Created by DuocNgo on 2/27/2024 in #💻┃support
Vercel deployment - Invalid callback url
Otherwise you might have to click save in the Kinde Settings after setting callback URLs
58 replies
KKinde
Created by DuocNgo on 2/27/2024 in #💻┃support
Vercel deployment - Invalid callback url
If you have updated environment variables on vercel, you will have to redeploy your application for the env variables to update - maybe that'll do it?
58 replies
KKinde
Created by TARS on 2/6/2024 in #💻┃support
Can't get the user info from const { getUser } = getKindeServerSession();
Ah yep, in the Joshtriedcoding video it may have been a previous version of the sdk 🙂
27 replies
KKinde
Created by Ɇ₦ĐɆⱤV₳₥₱łⱤɆ on 1/28/2024 in #💻┃support
Having problems with logout URLs
Have you tried removing the trailing slash?
18 replies
KKinde
Created by Ɇ₦ĐɆⱤV₳₥₱łⱤɆ on 1/28/2024 in #💻┃support
Having problems with logout URLs
Ahhh snap gotcha
18 replies
KKinde
Created by Ɇ₦ĐɆⱤV₳₥₱łⱤɆ on 1/28/2024 in #💻┃support
Having problems with logout URLs
Fair enough, my thinking was that the sdk sends you to the logout_uri after logging out if the logout uri is listed under your allowed logout URLs in Kinde. So maybe there is a mismatch with the urls in prod that isn’t happening when in development
18 replies
KKinde
Created by Ɇ₦ĐɆⱤV₳₥₱łⱤɆ on 1/28/2024 in #💻┃support
Having problems with logout URLs
Sorry I meant the logout uri
18 replies
KKinde
Created by Ɇ₦ĐɆⱤV₳₥₱łⱤɆ on 1/28/2024 in #💻┃support
Having problems with logout URLs
could it be something to do with window.location.origin
18 replies
KKinde
Created by Ɇ₦ĐɆⱤV₳₥₱łⱤɆ on 1/28/2024 in #💻┃support
Having problems with logout URLs
Looks like you've done everything right- just out of curiosity have you tried hardcoding the redirect uri in prod?
18 replies
KKinde
Created by Thomas on 1/14/2024 in #💻┃support
Invalid export using kinde
what version of the sdk are you using?
16 replies
KKinde
Created by Thomas on 1/14/2024 in #💻┃support
Invalid export using kinde
dang thats no good
16 replies
KKinde
Created by Thomas on 1/14/2024 in #💻┃support
Invalid export using kinde
Make sure that the env variables on vercel are saved for production & after changing them on vercel you will have to redeploy
16 replies
KKinde
Created by Thomas on 1/14/2024 in #💻┃support
Invalid export using kinde
When deploying did you update the env variables and save the callback URLs?
16 replies
KKinde
Created by Thomas on 1/14/2024 in #💻┃support
Invalid export using kinde
So that the build can pass
16 replies
KKinde
Created by Thomas on 1/14/2024 in #💻┃support
Invalid export using kinde
This looks like an older version of the SDK - I would suggest doing something like return handleAuth(request, endpoint) as any
16 replies