Skip to content

Conversation

@KomanRudden
Copy link
Contributor

@KomanRudden KomanRudden commented Jan 18, 2026

Added invitation code support to OAuth login flow

Add support for invitation_code query parameter in FastAPI and Flask login routes. Automatically set is_invitation flag when invitation_code is provided. Add INVITATION_CODE and IS_INVITATION to LoginOptions.

Checklist

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

@KomanRudden KomanRudden requested a review from a team as a code owner January 18, 2026 16:39
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

Walkthrough

The changes add invitation code support to the OAuth login flow by introducing new login option constants (INVITATION_CODE and IS_INVITATION), updating OAuth parameter mapping with auto-propagation logic, and modifying FastAPI and Flask framework login routes to extract and pass invitation codes from query parameters.

Changes

Cohort / File(s) Summary
Framework Login Routes
kinde_fastapi/framework/fastapi_framework.py, kinde_flask/framework/flask_framework.py
Modified login routes to extract invitation_code from query parameters, build a login_options dictionary, and pass it to OAuth.login() instead of calling with no arguments.
Login Options Constants
kinde_sdk/auth/login_options.py
Added two new public constants: INVITATION_CODE ("invitation_code") and IS_INVITATION ("is_invitation").
OAuth Parameter Mapping
kinde_sdk/auth/oauth.py
Added mappings for INVITATION_CODE and IS_INVITATION parameters in login option handling. Implemented conditional logic to only include IS_INVITATION when truthy. Added auto-propagation: if INVITATION_CODE is provided and non-empty but IS_INVITATION is unset or falsy, automatically sets is_invitation to "true" in the generated URL.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding invitation code support to the OAuth login flow across multiple framework integrations.
Description check ✅ Passed The description clearly outlines the changes made: invitation code support in FastAPI and Flask routes, automatic is_invitation flag setting, and new LoginOptions constants.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

@codecov
Copy link

codecov bot commented Jan 18, 2026

Codecov Report

❌ Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
kinde_sdk/auth/oauth.py 0.00% 4 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants