spring-cloud-gateway-oauth2 icon indicating copy to clipboard operation
spring-cloud-gateway-oauth2 copied to clipboard

经过网关访问授权码模式是不行的。

Open musarona opened this issue 3 years ago • 0 comments

使用授码模式登录时,先访问地址获取授权码:http://localhost:9201/oauth/authorize?response_type=code&client_id=client-app-2&redirect_uri=https://www.baidu.com

但是很多时候,我们都需要通过网关访问后面的服务,你可以试试经过网关访问,因为spring cloud gateway处理数据时会丢掉session信息,经过网关,登陆后无法转向/oauth/authorize的。 http://localhost:9999/auth/oauth/authorize?response_type=code&client_id=client-app-2&redirect_uri=https://www.baidu.com

不经过网关,你网关后面的服务的ip,端口什么全都暴露的。防止cloud gateway,理论上所有外部调用API应该都要走gateway,内部feign互调才不需要走gateway。

musarona avatar Dec 16 '21 11:12 musarona