halo-sigs / plugin-oauth2

Halo 2.0 的 OAuth2 第三方登录插件。
https://halo.run/store/apps/app-ESVDK
GNU General Public License v3.0
20 stars 19 forks source link

新增自己oauth2 server,一直报错,希望大佬指点一下 #53

Open kevin518 opened 1 month ago

kevin518 commented 1 month ago
 [c3e5d8de-4343]  500 Server Error for HTTP GET "/login/oauth2/code/shenji?code=sZgylY&state=CVR7a4iSL4A9ia-Z_BML-St-JbyX4-0dDd15aAqlhEA%3D"
 java.lang.IllegalStateException: No provider found for class org.springframework.security.oauth2.client.authentication.OAuth2AuthorizationCodeAuthenticationToken
    at org.springframework.security.web.server.authentication.AuthenticationWebFilter.lambda$authenticate$6(AuthenticationWebFilter.java:124) ~[spring-security-web-6.3.1.jar:6.3.1]
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
    *__checkpoint ? run.halo.oauth.Oauth2Authenticator [DefaultWebFilterChain]
    *__checkpoint ? run.halo.oauth.Oauth2AuthorizationRequestRedirectWebFilter [DefaultWebFilterChain]
    *__checkpoint ? run.halo.app.webfilter.AdditionalWebFilterChainProxy [DefaultWebFilterChain]
    *__checkpoint ? HTTP GET "/login/oauth2/code/shenji?code=sZgylY&state=CVR7a4iSL4A9ia-Z_BML-St-JbyX4-0dDd15aAqlhEA%3D" [ExceptionHandlingWebHandler]
Original Stack Trace:
        at org.springframework.security.web.server.authentication.AuthenticationWebFilter.lambda$authenticate$6(AuthenticationWebFilter.java:124) ~[spring-security-web-6.3.1.jar:6.3.1]
        at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:45) ~[reactor-core-3.6.7.jar:3.6.7]
        at reactor.core.publisher.Mono.subscribe(Mono.java:4568) ~[reactor-core-3.6.7.jar:3.6.7]
        at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onComplete(FluxSwitchIfEmpty.java:82) ~[reactor-core-3.6.7.jar:3.6.7]
        at reactor.core.publisher.FluxHide$SuppressFuseableSubscriber.onComplete(FluxHide.java:147) ~[reactor-core-3.6.7.jar:3.6.7]