TF-624 Check and get oidc configuration on browser

This commit is contained in:
dab246
2022-06-07 18:09:32 +07:00
committed by Dat H. Pham
parent 9092e30b96
commit 217a3ccc9e
6 changed files with 80 additions and 3 deletions
@@ -46,7 +46,8 @@ class LoginView extends BaseLoginView {
),
Obx(() => buildLoginMessage(context, loginController.loginState.value)),
buildInputCredentialForm(context),
buildLoginButton(context)
buildLoginButton(context),
buildSSOButton(context),
],
)
),
@@ -161,7 +162,8 @@ class LoginView extends BaseLoginView {
),
Obx(() => buildLoginMessage(context, loginController.loginState.value)),
buildInputCredentialForm(context),
buildLoginButton(context)
buildLoginButton(context),
buildSSOButton(context),
],
)
)
@@ -198,4 +200,28 @@ class LoginView extends BaseLoginView {
]
);
}
Widget buildSSOButton(BuildContext context) {
return Container(
margin: const EdgeInsets.only(bottom: 16, left: 24, right: 24),
width: responsiveUtils.getDeviceWidth(context),height: 48,
child: ElevatedButton(
key: const Key('ssoSubmitForm'),
style: ButtonStyle(
foregroundColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) => Colors.white),
backgroundColor: MaterialStateProperty.resolveWith<Color>((Set<MaterialState> states) => AppColor.textFieldErrorBorderColor),
shape: MaterialStateProperty.all(RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
side: const BorderSide(width: 0, color: AppColor.textFieldErrorBorderColor)
))
),
child: Text(AppLocalizations.of(context).singleSignOn,
style: const TextStyle(fontSize: 16, color: Colors.white)
),
onPressed: () {
loginController.handleSSOPressed();
}
)
);
}
}