Skip to content

Commit

Permalink
fix : (#29) cors
Browse files Browse the repository at this point in the history
  • Loading branch information
coehgns committed Feb 12, 2025
1 parent c05206c commit 77557d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SecurityConfig(
.anyRequest().authenticated()
}

githubOAuth2LoginConfig.configure(http, clientRegistrationRepository)
githubOAuth2LoginConfig.configure(http, clientRegistrationRepository, corsConfigurationSource)

return http.build()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ class GithubOAuth2LoginConfig {
fun configure(
http: HttpSecurity,
clientRegistrationRepository: ClientRegistrationRepository,
corsConfigurationSource: CorsConfigurationSource
) {
http
.cors { it.configurationSource(corsConfigurationSource) }
.oauth2Login { oauth ->
oauth
.successHandler(githubAuthenticationSuccessHandler())
Expand Down

0 comments on commit 77557d5

Please sign in to comment.