Skip to content

Commit

Permalink
fix : OAuth2 Secret 재적용
Browse files Browse the repository at this point in the history
  • Loading branch information
AKKDevMachine committed Jan 19, 2025
1 parent faeed5f commit ace9efd
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package team_project.clat.oauth2;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.security.oauth2.client.registration.ClientRegistration;
import org.springframework.security.oauth2.core.AuthorizationGrantType;
import org.springframework.security.oauth2.core.oidc.IdTokenClaimNames;
Expand All @@ -8,11 +9,17 @@
@Component
public class SocialClientRegistration {

@Value("{oauth2.google.client-secret}")
String googleSecret;

@Value("{oauth2.naver.client-secret}")
String naverSecret;

public ClientRegistration naverClientRegistration() {

return ClientRegistration.withRegistrationId("naver")
.clientId("nTYJzjk224aAD0gGHBn9")
.clientSecret("6gqc9cugKC")
.clientSecret(naverSecret)
.redirectUri("https://clat.duckdns.org/login/oauth2/code/naver")
.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
.scope("name", "email")
Expand All @@ -27,7 +34,7 @@ public ClientRegistration googleClientRegistration() {

return ClientRegistration.withRegistrationId("google")
.clientId("52474534592-p74ookn70s1m2l1qjqvf66u63bslcglu.apps.googleusercontent.com")
.clientSecret("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")
.clientSecret(googleSecret)
.redirectUri("https://clat.duckdns.org/login/oauth2/code/google")
.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE)
.scope("profile", "email")
Expand Down

0 comments on commit ace9efd

Please sign in to comment.