KINDE_AUTH_WITH_PKCE on sveltekit throws error
Hi,
When trying to authenticate you'll get redirected to the callback url.
When the request hits the sveltekit server you'll find this error in the console:
7 Replies
@MiniKraken thanks for raising this.
Based on the error message provided, it appears that there is an issue with the access token being committed to memory within the SvelteKit server. The error INVALID_TOKEN_MEMORY_COMMIT suggests that the token being used is invalid or not in the correct format expected by the Kinde SDK.
To resolve this issue, you should ensure that the access token being received from Kinde is valid and correctly formatted. This may involve checking the token generation and exchange process, ensuring that the correct client credentials are being used, and that the token has not expired or been tampered with.
If you are using the SvelteKit SDK, you should also verify that the SDK is properly configured and that the environment variables are set correctly. Make sure that the KINDE_CLIENT_ID, KINDE_CLIENT_SECRET, and other related environment variables match the values provided by Kinde for your application.
If after these checks you are still facing the error, let me know and I can an expert on the case
Thank you for your response. The thing is when i switch off PKCE it is working as expected. And also the error shows up on the callback path so I haven't modified the token in any way. The other env variables are correctly filled in. So I'm a bit at a loss here.
Thanks for confirm @MiniKraken I am getting a team member to look into this.
Thanks. Appreciate it.
any update on this ? @Andre @ Kinde
Sorry in the delay, the team is trying replicate your issue. Are you able to provide us details regarding how you have PKCE configured on your end?
I'll try to create a Minimal Reproducable repo asap.
Thanks