Skip to content

UI Kitten implementation for AWS Amplify authentication UI.

License

Notifications You must be signed in to change notification settings

MEOM/aws-amplify-auth-ui-kitten

Repository files navigation

AWS-Amplify-Auth-UI-Kitten

UI Kitten implementation for AWS Amplify authentication UI.

NPM

Prerequisites

Install

yarn add aws-amplify-auth-ui-kitten

How to use

import * as eva from '@eva-design/eva';
import { ApplicationProvider, IconRegistry } from '@ui-kitten/components';
import { EvaIconsPack } from '@ui-kitten/eva-icons';
import { SignIn, SignUp, ConfirmSignUp, ConfirmSignIn, ForgotPassword, RequireNewPassword } from 'aws-amplify-auth-ui-kitten';
import { Authenticator } from 'aws-amplify-react-native';

export default () => {
  const [authState, setAuthState] = useState<string>()

  return (
    <>
      <IconRegistry icons={EvaIconsPack} />
      <ApplicationProvider {...eva} theme={eva.light}>
        {authState === 'signedIn' ? (<App />) : (
          <Authenticator
            onStateChange={setAuthState}
            hideDefault={true}
          >
            <SignIn />
            <ConfirmSignIn />
            <ConfirmSignUp />
            <ForgotPassword />
            <RequireNewPassword />
            <SignUp />
          </Authenticator>
        )}
      </ApplicationProvider>
    </>
  )
}

License

MIT license.


Made with ❤️ by MEOM