# iframe内で/loginをプログラム的に開いた際の新規ユーザー向けソーシャルログインモーダルの問題

**URL:** <https://meta.discourse.org/t/issue-with-social-login-modal-new-user-when-login-is-opened-programmatically-in-an-iframe/138967>\
**Category:** Product Support\
**Created:** [2020 年 1 月 17 日午後 6:05 UTC](https://meta.discourse.org/t/issue-with-social-login-modal-new-user-when-login-is-opened-programmatically-in-an-iframe/138967 "2020-01-17T18:05:25Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)\
**Post date:** [2020 年 1 月 17 日午後 6:05 UTC](https://meta.discourse.org/t/issue-with-social-login-modal-new-user-when-login-is-opened-programmatically-in-an-iframe/138967/1 "2020-01-17T18:05:25Z")

</div>

こんにちは、

### 背景

Discourse API と SSO をプロバイダーとして使用するアプリを作成しました。  
現在、アプリは iframe 内で表示されているため、ソーシャルログインが正しく機能するには、`/login` ページを iframe 外で新しいブラウザタブで開く必要があります。  
ここまでは問題ありません。

### 問題点

新しいユーザーがソーシャルボタンを使用して登録すると、ソーシャルサイトへ正常にリダイレクトされますが、Discourse へ戻った際に問題が発生します。Discourse は、ユーザー名/メールが記入されたモーダルの代わりに、通常のログインモーダルを表示してしまいます。  
登録を完了するには、このログインモーダルを閉じ、手動でサインアップボタンをクリックする必要があります。

既存ユーザーのログインは期待通りに動作します。  
何か見落としているのでしょうか、それとも Discourse が適切に処理していないコンテキストがあるのでしょうか？技術的には同じはずです。

デモをご覧になりたい場合はお知らせください。PM で短い動画をお送りできます（個人情報が含まれます）。

ご支援をよろしくお願いいたします。

---

_[View the full topic](https://meta.discourse.org/t/issue-with-social-login-modal-new-user-when-login-is-opened-programmatically-in-an-iframe/138967)._
