0
在我的Spring Boot應用程序中,我使用Spring Social(1.1.4.RELEASE)(Facebook,Google,LinkedIn和Twitter)實現了登錄。Spring社交:當服務器後面的代理服務器重定向url
在登錄過程中,服務器調用以下HTTP GET:
https://accounts.google.com/o/oauth2/auth?client_id=XXX&response_type=code&redirect_uri=http://xzy.com:91/auth/google&scope=email&state=YYY
問題是在這裏:REDIRECT_URI = HTTP://xzy.com:91/AUTH /谷歌
該應用程序在代理之後,我需要變化REDIRECT_URI到
http://xzy.com:91/auth/google - >http://xzy.com/auth/google
我想這是很常見的問題,但我沒能找到工作液(
我POM:
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-security</artifactId>
<version>${spring-social-version}</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-linkedin</artifactId>
<version>${spring-social-linkedin.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-twitter</artifactId>
<version>${spring-social-twitter.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-google</artifactId>
<version>${spring-social-google.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-facebook</artifactId>
<version>${spring-social-facebook.version}</version>
</dependency>
感謝您的建議,但它仍然無法正常工作。它似乎可以用於HTTP GET xxx/signup/facebook,但我的請求是xxx/auth/facebook –
請發佈你的配置 – chaoluo