Skip to content
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

update custom header value and version #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wahabniazi56
Copy link
Contributor

@wahabniazi56 wahabniazi56 commented Jul 26, 2024

Explain your changes

"Update" custom header additional parameter Kinde-SDK with new value "Python/2.3.1" I have change this value SDKVersionString in KindeSDK-Info.plist as well.

Checklist

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

Copy link

coderabbitai bot commented Jul 26, 2024

Walkthrough

The changes primarily focus on updating the Kinde SDK version from 1.2.0 to 2.3.1, reflecting significant enhancements or fixes. Key modifications include updating the SDK version in the Info.plist, altering the identification in the authentication process from Swift to Python, and changing the default fallback version string in the SDK version struct. These updates aim to improve the SDK's functionality and compatibility.

Changes

Files Change Summary
KindeSDK-Info.plist Updated SDKVersionString from 1.2.0 to 2.3.1.
Sources/KindeSDK/Auth/Auth.swift Changed "Kinde-SDK" identifier from "Swift/(SDKVersion.versionString)" to "Python/(SDKVersion.versionString)".
Sources/KindeSDK/Utils/SDKVersion.swift Modified versionString fallback in SDKVersion struct from "1.2.0" to "2.3.1".

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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9e88a35 and 351838c.

Files selected for processing (3)
  • KindeSDK-Info.plist (1 hunks)
  • Sources/KindeSDK/Auth/Auth.swift (1 hunks)
  • Sources/KindeSDK/Utils/SDKVersion.swift (1 hunks)
Files skipped from review due to trivial changes (1)
  • KindeSDK-Info.plist
Additional comments not posted (2)
Sources/KindeSDK/Utils/SDKVersion.swift (1)

3-3: LGTM!

The default version string has been correctly updated to "2.3.1".

Sources/KindeSDK/Auth/Auth.swift (1)

469-469: LGTM!

The custom header value has been correctly updated to "Python/(SDKVersion.versionString)".

coderabbitai[bot]
coderabbitai bot previously approved these changes Jul 26, 2024
@onderay
Copy link
Member

onderay commented Aug 1, 2024

@wahabniazi56 the tracker should not be Python it needs to be iOS and update it to be 1.2.0. The python was just an example.

@wahabniazi56
Copy link
Contributor Author

@onderay please confirm me again because as per your message its seems like to update with Python. Anyways, now please confirm me that it should be "iOS" or "Swift"??? because last time it was "Swift"

@DanielRivers DanielRivers dismissed coderabbitai[bot]’s stale review August 13, 2024 11:08

Not valid solution to the requested fix

@DanielRivers
Copy link
Contributor

@wahabniazi56 the issue is here is the Kinde-SDK is passed as a query parameter and not as a http header, this needs to be appended as a new header value of the auth /token request for it to be picked up by the Kinde analytics.

can the tracker indicated be swift:ios, the version reported, could this please be picked up automatically from the plist file so it always matches the current version of the SDK 🙏

Thank you so much

@wahabniazi56
Copy link
Contributor Author

wahabniazi56 commented Aug 13, 2024

@DanielRivers, I reviewed your message but I did not understand clearly what you exactly wants to change in SDK because there is not any method which support additional Headers in AppAuth library. I explored little bit but not find any way to add header in refreshToken request. So do I need to change whole method or there is any other possible way to do that?

it would be great if you explain me clearly with screenshot of code or any postman request which exactly you want. Because I'm new with this SDK and I don't want to change anything until I'm 100% sure with that it can be cause with other issues. So Please explain me in more details.

Thanks

@wahabniazi56
Copy link
Contributor Author

wahabniazi56 commented Aug 15, 2024

@DanielRivers, I reviewed your message but I did not understand clearly what you exactly wants to change in SDK because there is not any method which support additional Headers in AppAuth library. I explored little bit but not find any way to add header in refreshToken request. So do I need to change whole method or there is any other possible way to do that?

it would be great if you explain me clearly with screenshot of code or any postman request which exactly you want. Because I'm new with this SDK and I don't want to change anything until I'm 100% sure with that it can be cause with other issues. So Please explain me in more details.

Thanks

On further checking, I found that this PR implemented custom header passing in auth/token requests. However, this PR was not merged into the main branch. Can I use a specific commit of AppAuth in the Kinde SDK?

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.

3 participants