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

feat: fix null bug for clientSecret in refreshToken #48

Merged

Conversation

zHElEARN
Copy link
Contributor

@zHElEARN zHElEARN commented Jan 22, 2025

Fix: #47

This PR addresses issue #47, where the refreshToken function fails when clientSecret is null. The root cause was the inclusion of a null value for client_secret in the request body, leading to a type casting error. The casdoor.refreshToken function has been updated to exclude the client_secret field when it is null. This ensures proper handling of such cases and prevents runtime errors.

This commit resolves issue #47 by updating the `casdoor.refreshToken` function to handle `null` values for `clientSecret`. When `clientSecret` is `null`, the field is now excluded from the request body, avoiding type casting errors.
@hsluoyz hsluoyz changed the title Fix Null Handling for clientSecret in refreshToken (#47) feat: fix null bug for clientSecret in refreshToken Jan 22, 2025
@hsluoyz hsluoyz merged commit bedbc8a into casdoor:master Jan 22, 2025
7 checks passed
@zHElEARN zHElEARN deleted the fix/null-client-secret-refresh-token branch January 22, 2025 14:04
github-actions bot pushed a commit that referenced this pull request Jan 22, 2025
# [1.8.0](v1.7.0...v1.8.0) (2025-01-22)

### Features

* fix null bug for clientSecret in refreshToken ([#48](#48)) ([bedbc8a](bedbc8a))
@hsluoyz
Copy link
Member

hsluoyz commented Jan 22, 2025

🎉 This PR is included in version 1.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refreshToken Fails When clientSecret is Null
2 participants