Skip to content

Commit

Permalink
Better readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jyri Leinonen committed Jan 5, 2021
1 parent c7a79a1 commit 3854b8f
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,52 @@
# aws-amplify-auth-ui-kitten
# AWS-Amplify-Auth-UI-Kitten

[UI Kitten](https://github.com/akveo/react-native-ui-kitten) implementation fro [AWS Amplify](https://github.com/aws-amplify/amplify-js) authentication UI.

[![NPM](https://nodei.co/npm/aws-amplify-auth-ui-kitten.png?compact=true)](https://nodei.co/npm/aws-amplify-auth-ui-kitten/)

## Prerequisites

- Install UI Kitten, see [documentation](https://akveo.github.io/react-native-ui-kitten/docs/guides/getting-started#getting-started)
- Install and configure AWS Amplify Authetication for react native, see [documentation](https://docs.amplify.aws/start/q/integration/react-native)

## Install

`yarn add aws-amplify-auth-ui-kitten`

## How to use

```
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) license.

---
Made with ❤️ by [MEOM](https://www.meom.fi)

0 comments on commit 3854b8f

Please sign in to comment.