kinde-auth-react icon indicating copy to clipboard operation
kinde-auth-react copied to clipboard

chore: setup logging to verify where the provider is failing.

Open pesickaa opened this issue 1 month ago • 1 comments

Explain your changes

Issue 203

  1. Set your .env in the playground to an active app, have the redirectUrl set to VITE_KINDE_REDIRECT_URL="http://localhost:3000/?user_type=client"
  2. Run the playground
  3. Try to login.

Expected: You can login Actual: When you try to login, you will be returned to your kinde site, but there will be query params up at the top, and the token is not properly consumed. You will see the &user_type=client at the very end of the url. If you move that to directly after the localhost url, it will log you in fine.

When trying to debug, it seems it fails at the processAuthResult where it calls decode. I believe it is failing at exchangeAuthCode. But it is failing in such a way it doesn't seem to throw an error

What the URL looks like after attempting to login

http://localhost:3000/?code=<Code here>&scope=email%20profile%20openid%20offline&state=<state info>&user_type=client

The init runs, and checks if it matches the redirectUrl. It passes a false back, because the url doesn't match the redirectUrl because the redirect url is set to http://localhost:3000/?user_type=client but it's getting back http://localhost:3000/?code=...&user_type=client.

Because of this, it looks like it's not pulling the code out of the url because it fails to match

If you move the user_type=client to directly after the localhost:3000/ it redirects, removes the code and scope and state stuff as expected.

Suppose there is a related issue with enough detail for a reviewer to understand your changes fully. In that case, you can omit an explanation and instead include either “Fixes #XX” or “Updates #XX” where “XX” is the issue number.

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

pesickaa avatar Nov 19 '25 16:11 pesickaa

[!IMPORTANT]

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch fix/processAuthResult-when-params

[!TIP]

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions: | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context. Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 19 '25 16:11 coderabbitai[bot]