-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jyri Leinonen
committed
Jan 5, 2021
1 parent
c7a79a1
commit 3854b8f
Showing
1 changed file
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |