# SSO 리다이렉트 문제

**URL:** <https://meta.discourse.org/t/sso-redirect-issues/216011>\
**Category:** WordPress\
**Created:** [1월 26, 2022, 12:23오전 UTC](https://meta.discourse.org/t/sso-redirect-issues/216011 "2022-01-26T00:23:29Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dbwhite](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dbwhite/32/247431_2.png) [@dbwhite](https://meta.discourse.org/u/dbwhite)\
**Post date:** [1월 26, 2022, 12:23오전 UTC](https://meta.discourse.org/t/sso-redirect-issues/216011/1 "2022-01-26T00:23:30Z")

</div>

[WP Discourse](https://github.com/discourse/wp-discourse) 플러그인을 통해 Discourse를 WordPress와 통합하고 있으며, WordPress를 [Discourse Connect](https://meta.discourse.org/t/13045?silent=true) 제공자로 사용하고 있습니다. 그러나 인증되지 않은 사용자가 Discourse 인스턴스를 방문한 후 로그인이 필요한 버튼을 클릭할 경우 무한 리다이렉트 루프에 갇히는 문제가 발생하고 있습니다.

원하는 동작은 다음과 같습니다: 사용자가 Discourse 로그인 버튼을 클릭 → WordPress 로그인 페이지로 리다이렉트 → 사용자가 인증을 완료하고 이전에 있던 Discourse 페이지로 다시 리다이렉트됩니다. 이미 인증된 사용자가 인증 후 Discourse 인스턴스를 방문하는 경우 현재는 문제가 없습니다. 이 오류는 인증되지 않은 사용자가 처음 Discourse 인스턴스를 방문할 때 발생합니다.

현재 동작은 다음과 같습니다: **사용자가 Discourse 로그인 버튼을 클릭**  **→** https://[discourse-instance]/session/sso?return\_path=%2Ft%2F[사용자가 이전에 있던 discourse 페이지]%2F16 **로 리다이렉트됨 →** https://[wordpress-site]/?sso=[SSO 토큰]%3D%3D&sig=[서명 토큰] **로 리다이렉트됨 →** https://[wordpress-site]/?sso=[SSO 토큰]%3D%3D&sig=[서명 토큰]&redirect\_to=%2F%3Fsso%[SSO 토큰]%253D%253D%26sig%3D[서명 토큰] **로 리다이렉트됨 →** 그리고 이 사이클이 재귀적으로 반복되어 브라우저가 "리다이렉트가 너무 많습니다"라는 오류를 출력할 때까지 계속됩니다.

이 문제를 해결하는 스레드를 찾지 못했으며, 가장 유사한 스레드는

> [@SSO redirect loop](https://meta.discourse.org/t/sso-redirect-loop/117898):
>
> Hey there, we’re using Discourse [v2.3.0.beta2 +130] with SSO. For a few months now (sorry that I can’t pinpoint the exact update that caused the issue) collegues are reporting SSO redirect loops (followed by 429 errors which is ok) when clicking on discourse links in webmail clients. This only happens, if one is already logged in. We can reproduce in Firefox and Chrome on Windows and Linux. Steps to reproduce: When logged out of discourse (all cookies cleaned etc) Click on a Disourse link in…

입니다. 하지만 모든 곳에 SSL이 활성화되어 있으며 이 문제는 모든 브라우저에서 발생합니다. 이 문제를 해결하는 방법에 대한 제안이 있을까요?

---

_[View the full topic](https://meta.discourse.org/t/sso-redirect-issues/216011)._
