# OAuth2 인증 실패: CSRF 감지 오류

**URL:** https://meta.discourse.org/t/oauth2-authentication-failure-csrf-detected-error/363932
**Category:** SSO
**Tags:** oauth2
**Created:** [4월 29, 2025, 8:02오전 UTC](https://meta.discourse.org/t/oauth2-authentication-failure-csrf-detected-error/363932 "2025-04-29T08:02:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Evie\_Tao](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/evie_tao/32/487964_2.png) [@Evie\_Tao](https://meta.discourse.org/u/Evie_Tao)
#### Post date: [4월 29, 2025, 8:02오전 UTC](https://meta.discourse.org/t/oauth2-authentication-failure-csrf-detected-error/363932/1 "2025-04-29T08:02:04Z")

</div>

안녕하세요,  
Discourse 인스턴스에 OAuth2 인증으로 로그인할 때 문제가 발생하고 있습니다. 로그인을 시도하는 사용자에게 다음과 같은 오류 메시지가 표시됩니다:

 ![The image shows a stack trace of a Ruby Rails application with an authentication failure caused by CSRF detection during an OATH2 session. (由 AI 生成标题)](https://global.discourse-cdn.com/meta/original/4X/b/2/4/b246155ecb2c42897b812cdd1cd9221fc02fe7f0.png)

OAuth2 콜백 단계에서 CSRF 토큰 검증 실패와 관련이 있는 것으로 보입니다.

확인해 본 사항:

• 브라우저 쿠키와 세션

• OAuth2 설정과 콜백 URL이 올바르게 구성되었는지

그러나 문제는 여전히 지속되어 로그인 시도가 계속 실패하고 있습니다.

이 오류가 발생하는 이유와 해결 방법에 대해 도움을 주실 수 있을까요?

미리 도움을 주셔서 감사합니다!
