Skip to content

Commit

Permalink
fix : apple 로그인 보완
Browse files Browse the repository at this point in the history
  • Loading branch information
lalabulla committed Jan 22, 2025
1 parent 58702f9 commit 9dcf3d9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import java.io.Reader;
import java.io.StringReader;
import java.security.PrivateKey;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -94,8 +96,8 @@ private String generateClientSecret() {
.issuer(teamId)
.audience().add("https://appleid.apple.com").and()
.subject(clientId)
.issuedAt(new Date())
.expiration(new Date(1000*60))
.issuedAt(new Date(System.currentTimeMillis()))
.expiration(Date.from(LocalDateTime.now().plusDays(30).atZone(ZoneId.systemDefault()).toInstant()))
.signWith(getPrivateKey(), SignatureAlgorithm.ES256)
.compact();
}
Expand Down

0 comments on commit 9dcf3d9

Please sign in to comment.