Getting error after signin

I am using nuxt module, but when I sign in I am getting the following error, I can not work out which piece of the puzzle is missing.
{"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. This client must include a code_challenge when performing the authorize code flow, but it is missing."}
{"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. This client must include a code_challenge when performing the authorize code flow, but it is missing."}
15 Replies
Oli - Kinde
Oli - Kinde12mo ago
Hey @DanielRivers, The error message you're seeing is related to the OAuth 2.0 authorization code flow with PKCE (Proof Key for Code Exchange). It seems like your application is missing the code_challenge parameter which is required for this flow. In the context of Kinde's Nuxt module, this should be handled automatically by the module. However, if you're seeing this error, it might be due to a misconfiguration. Here are a few things you can check: 1. Make sure you've correctly set up the Nuxt Kinde module in your project. You should have installed the @nuxtjs/kinde dependency and added it to the modules section of your nuxt.config.ts file. 2. Check your .env file and ensure you've correctly set the following values: NUXT_KINDE_CLIENT_ID NUXT_KINDE_CLIENT_SECRET NUXT_KINDE_AUTH_DOMAIN NUXT_KINDE_REDIRECT_URL NUXT_KINDE_LOGOUT_REDIRECT_URL NUXT_KINDE_POST_LOGIN_REDIRECT_URL 3. Make sure you've set the correct callback URLs in your Kinde settings. The callback URL should match the NUXT_KINDE_REDIRECT_URL value in your .env file.
Let me know if you are still having issues.
DanielRivers
DanielRivers12mo ago
Yea its all configured what appears to be correctly.
... Others
NUXT_KINDE_REDIRECT_URL="http://localhost:8000/api/callback"
NUXT_KINDE_LOGOUT_REDIRECT_URL="http://localhost:8000"
NUXT_KINDE_POST_LOGIN_REDIRECT_URL="http://localhost:8000"
... Others
NUXT_KINDE_REDIRECT_URL="http://localhost:8000/api/callback"
NUXT_KINDE_LOGOUT_REDIRECT_URL="http://localhost:8000"
NUXT_KINDE_POST_LOGIN_REDIRECT_URL="http://localhost:8000"
No description
DanielRivers
DanielRivers12mo ago
The login button works and directs to kinde, that suggests that the module is installed correctly I assume? any thoughts? @Oli - Kinde ?
Oli - Kinde
Oli - Kinde12mo ago
Hey @DanielRivers , Sorry for the late reply. I have passed this issue onto our Nuxt expert who will investigate this issue further. Hey @DanielRivers, Would you be able to send over a recording or screenshot of your issue? If it has sensitive material, feel free to DM me the recording or screenshot
DanielRivers
DanielRivers12mo ago
Sure. Will do that as soon as finished school run 😫 Was the video I sent what you're after?
Oli - Kinde
Oli - Kinde12mo ago
Hey @DanielRivers, I cannot see the video you sent. Where can I find it? Apologies @DanielRivers, I can see the video you sent in a DM. I will pass this onto my team to investigate.
Oli - Kinde
Oli - Kinde12mo ago
Hey @DanielRivers , I can see your .env file has a client secret of "<your_kinde_client_secret>". Can you change this to your actual client secret and then see if the issue remains? The following guide has details on where to find your client secret: https://kinde.com/docs/connect-to-kinde/getting-app-keys/#view-and-copy-app-keys
Kinde Docs
Get application keys - Connect to Kinde - Help center
Our developer tools provide everything you need to get started with Kinde.
DanielRivers
DanielRivers12mo ago
I have added no difference. Wasn't sure it was needed at this point as I was only doing the client auth flow hence why didn't add. But netherless, it has made no difference. @Oli - Kinde sorry forgot tag
Oli - Kinde
Oli - Kinde12mo ago
Okay I will dive into this further with my team and get back to you @DanielRivers Hey @DanielRivers, Another quick question, after adding your client secret, did you restart your server?
DanielRivers
DanielRivers12mo ago
Pretty certain I did, I can try again now though I did, but! ... I was using the client front-end app clientId and the back-end web secret. I will do a quick PR on the nuxt module to make it clearer that need to use the BE keys, that was the mistake here. It is now working I have them synced correctly. Thanks for your help.
Oli - Kinde
Oli - Kinde12mo ago
Good to hear that you solved your issue. Yes please feel free to raise a PR.
DanielRivers
DanielRivers12mo ago
GitHub
docs: Update readme to be clearer that the back-end web keys should...
Updated the readme to make clearer that the back-end web keys are required for the module to work
Oli - Kinde
Oli - Kinde12mo ago
Nice! That's was quick. I'll get my team to review it. Please don't hesitate to reach out if you come across any other issues.
DanielRivers
DanielRivers12mo ago
Will do, I will see if I can improve the DX also for people who don't read the readme lol. That will take me a little longer.
Thanks again @Oli - Kinde ⭐
Oli - Kinde
Oli - Kinde12mo ago
That would be super helpful too. Feel free to raise a PR for that too. We review all PRs.
Want results from more Discord servers?
Add your server