스프링 소셜에 대한 질문이 있습니다. ProviderSigninController의 문서는 말한다 : 이것은 내가보기에/로그인 절차를지도해야 함을 의미스프링 소셜 : 제공자 로그인 컨트롤러
**1 -** POST /signin/{providerId} - Initiates the sign in flow by redirecting to
the provider's authentication endpoint.
**2 -** GET /signin/{providerId}?code={verifier} - Receives the authentication
callback from the provider, accepting a code. Exchanges this code for an
access token. Using this access token, it retrieves the user's provider
user ID and uses that to lookup a connected account and then
authenticates to the application through the sign in service.
**2-a** If the provider user ID doesn't match any existing connection,
ProviderSignInController will redirect to a sign up URL. The default sign
up URL is "/signup" (relative to the application root), but can be
customized by setting the signUpUrl property.
**2-b** If the provider user ID matches more than one existing connection,
ProviderSignInController will redirect to the application's sign
in URL to offer the user a chance to sign in through another provider
or with their username and password. The request to the sign in URL will
have an "error" query parameter set to "multiple_users" to indicate
the problem so that the page can communicate it to the user. The default
sign in URL is "/signin" (relative to the application root),
but can be customized by setting the signInUrl property.
**2-c** If any error occurs while fetching the access token or while fetching
the user's profile data, ProviderSignInController will redirect to the
application's sign in URL. The request to the sign in URL will have an
"error" query parameter set to "provider" to indicate an error occurred
while communicating with the provider. The default sign in URL is
"/signin" (relative to the application root), but can be customized by
setting the signInUrl property.
:
OAuth를 2 제공자를 통해 인증, ProviderSignInController는 다음과 같은 흐름을 지원?
참조 : http://docs.spring.io/spring-social/docs/1.1.0.M4/reference/html/signin.html
업데이트 : I 수정 내 configuration.So 내가 구성 가입 URL 및 signinurl에 지정합니다. 이제 나는 이해할 수없는 오류 문제에 직면 해있다. oAuth 댄스는 2-c 단계로 진행되지만 error = provider와 함께 signinurl로 리디렉션됩니다. 공급자에 대한 오류입니다. 로그를 조회 할 때 다음 메시지가 나타납니다.
[org.springframework.social.connect.web.ProviderSignInController] [] http-bio-8080-exec-10 Exception while handling OAuth2 callback (No Session found for current thread). Redirecting to /login
어떤 세션입니까? 나는 이해하지 못한다. 로그인 절차/{에서는 공급자}, 당신은 페이스 북의 인증 화면으로 연결됩니다 /에 게시 할 때 여기, 전체 로그 파일 http://pastebin.com/wzL4ZQFk
컨트롤러가'/ signin' 뷰를 처리한다고 생각하지만, 여러분은'/ signup' 뷰를 책임지고 있습니다. – CodeChimp
로그인이 작동하는 것처럼 보이지만 연결을 유지하려고 할 때 앱이 실패합니다. 데이터베이스 또는 메모리 내 지속성을 사용하고 있습니까? – Alex