mirror of
https://gitee.com/yadong.zhang/JustAuth.git
synced 2025-12-06 08:48:27 +08:00
💩 improve: 优化 AuthCallback 获取 code 的方式
This commit is contained in:
parent
6d8b3b5f1d
commit
0eafb96a43
@ -5,6 +5,7 @@ import lombok.Builder;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import me.zhyd.oauth.utils.StringUtils;
|
||||
|
||||
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>
|
||||
*/
|
||||
private String error;
|
||||
|
||||
public String getCode() {
|
||||
return StringUtils.isEmpty(code) ? auth_code : code;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user