💩 improve: 优化 AuthCallback 获取 code 的方式

This commit is contained in:
yadong.zhang 2024-08-04 14:45:30 +08:00
parent 6d8b3b5f1d
commit 0eafb96a43

View File

@ -5,6 +5,7 @@ import lombok.Builder;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import me.zhyd.oauth.utils.StringUtils;
import java.io.Serializable; import java.io.Serializable;
@ -68,4 +69,8 @@ public class AuthCallback implements Serializable {
* @see <a href="https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms">error response</a> * @see <a href="https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms">error response</a>
*/ */
private String error; private String error;
public String getCode() {
return StringUtils.isEmpty(code) ? auth_code : code;
}
} }