Skip to content

Commit 3854b8f

Browse files
author
Jyri Leinonen
committed
Better readme
1 parent c7a79a1 commit 3854b8f

File tree

1 file changed

+52
-1
lines changed

1 file changed

+52
-1
lines changed

README.md

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,52 @@
1-
# aws-amplify-auth-ui-kitten
1+
# AWS-Amplify-Auth-UI-Kitten
2+
3+
[UI Kitten](https://github.com/akveo/react-native-ui-kitten) implementation fro [AWS Amplify](https://github.com/aws-amplify/amplify-js) authentication UI.
4+
5+
[![NPM](https://nodei.co/npm/aws-amplify-auth-ui-kitten.png?compact=true)](https://nodei.co/npm/aws-amplify-auth-ui-kitten/)
6+
7+
## Prerequisites
8+
9+
- Install UI Kitten, see [documentation](https://akveo.github.io/react-native-ui-kitten/docs/guides/getting-started#getting-started)
10+
- Install and configure AWS Amplify Authetication for react native, see [documentation](https://docs.amplify.aws/start/q/integration/react-native)
11+
12+
## Install
13+
14+
`yarn add aws-amplify-auth-ui-kitten`
15+
16+
## How to use
17+
18+
```
19+
import { SignIn, SignUp, ConfirmSignUp, ConfirmSignIn, ForgotPassword, RequireNewPassword } from 'aws-amplify-auth-ui-kitten';
20+
import { Authenticator } from 'aws-amplify-react-native';
21+
22+
export default () => {
23+
const [authState, setAuthState] = useState<string>()
24+
25+
return (
26+
<>
27+
<IconRegistry icons={EvaIconsPack} />
28+
<ApplicationProvider {...eva} theme={eva.light}>
29+
{authState === 'signedIn' ? (<App />) : (
30+
<Authenticator
31+
onStateChange={setAuthState}
32+
hideDefault={true}
33+
>
34+
<SignIn />
35+
<ConfirmSignIn />
36+
<ConfirmSignUp />
37+
<ForgotPassword />
38+
<RequireNewPassword />
39+
<SignUp />
40+
</Authenticator>
41+
)}
42+
</ApplicationProvider>
43+
</>
44+
)
45+
}
46+
```
47+
48+
## License
49+
[MIT](LICENSE) license.
50+
51+
---
52+
Made with ❤️ by [MEOM](https://www.meom.fi)

0 commit comments

Comments
 (0)