Closed DanielRivers closed 4 months ago
The project updates focus on refining URL handling across various components, enhancing security and maintainability. Changes include the removal of outdated dependencies, adoption of URLSearchParams
for more structured URL and parameter management, and adjustments in the OAuth flow to bolster security. A new changelog file has been introduced to document these and future modifications systematically.
File(s) | Summary of Changes |
---|---|
CHANGELOG.md |
Introduced to document project changes including new features and updates. |
__tests__/index.spec.ts , src/.../KindeSDK.ts |
Refactored URL construction using URLSearchParams for enhanced readability and maintainability. |
package.json |
Removed dependencies qs , superagent , url-parse and updated react-native-keychain . |
src/.../AuthorizationCode.ts |
Updated authorize method for robust PKCE flow handling and simplified URL parameter construction. |
src/SDK/OAuth/AuthorizationCode.ts (1)
`48-76`: The refactoring of the `authenticate` method to use `URLSearchParams` for constructing URL parameters is a solid improvement. It enhances readability and maintainability of the code.package.json (1)
`47-47`: Updating the version constraint for `react-native-keychain` to `>= 8.0` is a prudent choice to ensure compatibility with newer versions.src/SDK/KindeSDK.ts (2)
`188-200`: > :memo: **NOTE** > This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [191-216] The changes in the `logout` method to use `URLSearchParams` for constructing the URL parameters are well-implemented and improve the clarity and maintainability of the code. --- `242-248`: The `getToken` method's use of `URLSearchParams` to extract parameters from the URL is a robust approach, enhancing the method's reliability in handling URL parameters.__tests__/index.spec.ts (8)
`291-302`: Refactor URL parameter construction to use `URLSearchParams`. This change enhances readability and maintainability by adopting a more structured approach to URL parameter handling, aligning with the PR's objectives to improve URL handling across the project. --- `321-333`: Refactor URL parameter construction for registration endpoint to use `URLSearchParams`. This change is consistent with the PR's goal of enhancing URL handling by using modern JavaScript features. It improves the clarity and structure of the URL parameter construction. --- `363-365`: Refactor logout URL construction to use `URLSearchParams`. This modification simplifies the URL construction process for the logout functionality, making the code more maintainable and robust. --- `413-425`: Refactor URL parameter construction for creating an organization to use `URLSearchParams`. This change aligns with the PR's objectives by using `URLSearchParams` to handle URL parameters, which enhances the readability and maintainability of the code. --- `485-496`: Refactor URL parameter construction for authentication endpoint in Expo environment to use `URLSearchParams`. Adopting `URLSearchParams` in the Expo environment for constructing URL parameters is a positive change, enhancing the structure and readability of the code. --- `509-520`: Refactor URL parameter construction for registration endpoint in Expo environment to use `URLSearchParams`. This change continues the trend of improving URL handling within the project by utilizing `URLSearchParams`, which is beneficial for maintaining a consistent and clean approach across different environments. --- `534-536`: Refactor logout URL construction in Expo environment to use `URLSearchParams`. The use of `URLSearchParams` for constructing logout URLs in the Expo environment aligns with the overall improvements made in URL handling across the project. --- `578-590`: Refactor URL parameter construction for creating an organization in Expo environment to use `URLSearchParams`. This modification is consistent with the PR's objectives to enhance URL handling by using modern JavaScript features, improving the clarity and structure of the URL parameter construction in different environments.
Explain your changes
This removes
superagent
andqs
which were unusedIt also refactors
url-parse
dependency out in favour of the native URLSearchParamsChecklist
🛟 If you need help, consider asking for advice over in the Kinde community.
Summary by CodeRabbit
CHANGELOG.md
for documenting notable changes and version updates.URLSearchParams
for better readability and maintainability.package.json
.CHANGELOG.md
file.