Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

拡張機能: 認証処理の修正 #645

Merged
merged 1 commit into from
Sep 2, 2024
Merged

拡張機能: 認証処理の修正 #645

merged 1 commit into from
Sep 2, 2024

Conversation

wadabee
Copy link
Contributor

@wadabee wadabee commented Sep 2, 2024

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment on lines +73 to +81
{hasAuthenticated ? (
<>{props.children}</>
) : settings.enabledSamlAuth ? (
<div className="flex justify-center mt-3">
<Button onClick={() => signIn()}>ログイン画面へ</Button>
</div>
) : (
<Authenticator hideSignUp={!settings.enabledSelfSignUp}>{props.children}</Authenticator>
)}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SAML認証とUserPool認証で、認証済み画面を表示するロジックを共通化しました。

こちらは、UserPoolで認証を行った際に、認証済みでもAuthenticatorのChildrenが表示されない問題を回避する目的です。
恐らく、Authenticatorの設定項目を非同期で取得して設定している関係で、Authenticatorが認証ステータスを正しく取得できないことに起因する問題と思われます。
(SAML認証でも同様の問題があったのですが、UserPoolでもこの問題が発生することがわかり、共通化しました)

@tbrand tbrand merged commit 00ca2c9 into main Sep 2, 2024
2 checks passed
@tbrand tbrand deleted the fix/extension-auth branch September 2, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants