-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: updated the create or documentation #290
base: main
Are you sure you want to change the base?
fix: updated the create or documentation #290
Conversation
WalkthroughThe pull request introduces updates to the Ruby SDK documentation, focusing on the integration and usage of the Kinde SDK. Key modifications include clarifications on the installation process, configuration of callback URLs, and environment variables. The documentation now provides enhanced examples for configuring the SDK within Rails applications, updates to the authentication URL parameters, and detailed instructions for managing redirects and tokens. Additionally, method signatures for creating organizations and users have been simplified, improving clarity and usability for developers. Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (1)
src/content/docs/developer-tools/sdks/backend/ruby-sdk.mdx (1)
459-459
: Add security considerations for token storageThe documentation shows examples of storing tokens in Redis without addressing important security considerations:
$redis.set("kinde_m2m_token", result["access_token"], ex: result["expires_in"].to_i)Consider adding:
- A security warning about token storage
- Recommendations for encrypting tokens at rest
- Best practices for secure token handling
- Alternative approaches for different security requirements
- Links to security documentation
@@ -456,7 +456,7 @@ This token can then be used to call any of the endpoints in the [Kinde Manageme | |||
client = KindeSdk.client({"access_token" => $redis.get("kinde_m2m_token")}) | |||
client.organizations.get_organizations | |||
|
|||
client.organizations.create_organization(create_organization_request: {name: "new_org"}) | |||
client.organizations.create_organization(name: "new_org") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation shows inconsistent method signatures for creating organizations
The simplified method signature create_organization(name: "new_org")
shown here conflicts with other examples in the documentation that use the original signature create_organization(create_organization_request: {name: "new_org"})
. This inconsistency could confuse developers.
Please ensure all examples consistently use the same method signature throughout the documentation. If the signature has been simplified in a new version, consider:
- Adding a version note to indicate when this change was introduced
- Updating all examples to use the new signature
- Adding a migration guide if this is a breaking change
🛠️ Refactor suggestion
Documentation shows multiple patterns for user creation
The documentation presents two different approaches for creating users:
- Direct hash creation:
client.users.create_user(
create_user_request: {
profile: {given_name: "name", family_name: "surname"},
identities: [{type: "email", details: {email: "[email protected]"}}]
}
)
- Using model instances:
request = KindeApi::CreateUserRequest.new(...)
client.users.create_user(create_user_request: request)
This could confuse developers about the recommended approach.
Consider:
- Clearly indicating which approach is preferred
- Adding version information if these represent different SDK versions
- Removing deprecated examples if any
- Adding examples of the simplified signature mentioned in the AI summary
Description (required)
Updated the Ruby Documentation to correct the create organisation API call.
Related issues & labels (optional)
Summary by CodeRabbit