This is an Ant Design specific implementation of AWS Amplify React components for Authentication (SignUp, ConfirmSignUp, SignIn, SignOut, RequireNewPassword, ForgotPassword). You can use less and variables to style these components.
If you like this package and it helped you in any way, Star at github ⭐ ⭐ ⭐
Install
npm i -S antd-amplify-react
Usage
There are two components for each kind of component. One contains just Form and other contains the form component in Card container.
e.g. there is a component SignInForm without any container and SignIn with Card container. If you want more hold on styling of your form outer container, user Form components inside your own containers.
There is a special component AuthFlow which contains all above mentioned components in a single container and it handles all authentication flows and changes UI according to auth state.
Here are following components that you can use:
AuthFlow - This component contains all components in tab view where you can switch components by clicking on tab navs or you can use radio buttons.
SignIn: It's a sign in form contained in a Ant Design Card container
SignInForm: It's a simple Ant Design form with username and password field. You can wrapp this in any container and apply styles of your choice
SignUp: It's a sign up or registration form contained in a Ant Design Card container
SignUpForm: It's a simple Ant Design form with username and password field. You can enable a confirm password field as well. Wrap this component in any container and apply styles of your choice
ConfirmSignUp: This component will be rendered when Congnito will return a response with a challenge to confirm secret code sent to your email or phone number
ConfirmsignUpForm: A form that contains username and (secret) code fields to verify that given email belongs to one trying to sign up
ResetPassword: This component wrapps ResetPasswordForm in Ant Design Card and will be used to reset password and confirm change password flow.
ResetPasswordForm: This forms contains username/email field and on submission it will change to confirm password form which will ask for secret code that was sent to given email.
RequireNewPassword: Youa are required to change your password if Admin created your account and set a temporary password for you. On Signing with temporary password, your will be redirected to this view
RequireNewPasswordForm: This is a form component containing password field to update your password