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

Feature: custom OIDC provider #213

Merged
merged 7 commits into from
Apr 5, 2024
Merged

Feature: custom OIDC provider #213

merged 7 commits into from
Apr 5, 2024

Conversation

statefb
Copy link
Contributor

@statefb statefb commented Apr 3, 2024

Issue #, if available:

Description of changes:

  • Add custom OIDC provider

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

@statefb statefb requested a review from wadabee April 3, 2024 03:21
} from 'react';
import { BaseProps } from '../@types/common';
import { Auth } from 'aws-amplify';
import { Button, Text, Loader } from '@aws-amplify/ui-react';
Copy link
Contributor

Choose a reason for hiding this comment

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

AmplifyUIはAuthenticator以外利用していないので、他の画面に合わせて利用しないように修正をお願いします。
(ログイン画面なのであえてAmplifyUIを使ったのかもしれませんが、できればメインの画面に合わせたいです)

Loaderは以下のソースを再利用できる形に変えると良さそうです!

<div className="flex animate-spin items-center justify-center p-4">

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Amplify UI使わないよう変更しました!

return (
<>
{loading ? (
<div className="grid grid-cols-1 justify-items-center gap-4">
Copy link
Contributor

Choose a reason for hiding this comment

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

1項目しかないので、gridではなくflexで良いと思います。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

flexに統一しました!

<Button
variation="primary"
onClick={() => signIn()}
className="mt-6 w-60">
Copy link
Contributor

Choose a reason for hiding this comment

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

超細かくて恐縮ですが、言語によって幅の広さが変わるので、ボタンのwidth指定はあまり好ましくないです。
見栄えの観点でwidth指定していると思いますが、言語によって余白幅が変わり見栄えが変わってしまうという観点です(今回は大丈夫と思いますが、収まり切らずに文字がオーバーフローするリスクもあるので)
px-[number] で余白で調整した方が、ベターです!

もしログインボタンを強調したいのであれば、枠線をつけてその領域に注目がいくようにすれば良いかなと思います。
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

なるほど、その観点はなかったですね。勉強になります!pxで調整しました。
image

Copy link
Contributor

@wadabee wadabee left a comment

Choose a reason for hiding this comment

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

LGTM!!

@wadabee wadabee merged commit 5189895 into main Apr 5, 2024
5 of 6 checks passed
@wadabee wadabee deleted the add/custom-oidc-provider branch April 5, 2024 10:39
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