-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(docs): React Native federated sign in and install updates
- Loading branch information
1 parent
0bc6151
commit 97b1c43
Showing
6 changed files
with
78 additions
and
19 deletions.
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
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
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
13 changes: 13 additions & 0 deletions
13
...nnected-components/authenticator/configuration/socialProviders.react-native.mdx
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Alert } from '@aws-amplify/ui-react'; | ||
|
||
## Social Providers | ||
|
||
<Alert role="none" heading="Zero Configuration"> | ||
|
||
The Authenticator reads directly from your [Amplify configuration](/connected-components/authenticator#step-1-configure-backend) `socialProviders` from `amplify pull`. | ||
|
||
</Alert> | ||
|
||
Social Provider authentication is supported out of the box, to configure: | ||
- ensure the required dependencies have been installed in the [React Native Quick Start guide](../../connected-components/authenticator#step-2-install-dependencies) | ||
- configure your provider(s) by following the Amplify JS [Add Social Provider Sign-In guide](https://docs.amplify.aws/react-native/build-a-backend/auth/add-social-provider/) |
34 changes: 34 additions & 0 deletions
34
...atform]/connected-components/authenticator/quick-start-install.react-native.mdx
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,3 +1,37 @@ | ||
import { Example, ExampleCode } from '@/components/Example'; | ||
import { InstallScripts } from '@/components/InstallScripts'; | ||
|
||
<InstallScripts /> | ||
|
||
If your project will support Federated Sign In using the React Native `Authenticator` the `@aws-amplify/rtn-web-browser` package is also required: | ||
|
||
<InstallScripts command="npm install @aws-amplify/rtn-web-browser" framework="react-native" /> | ||
|
||
`@aws-amplify/react-native` and `@aws-amplify/rtn-web-browser` require a minimum iOS deployment target of `13.0`, open the _Podfile_ located in the _ios_ directory and update the `target` value: | ||
|
||
```diff | ||
- platform :ios, min_ios_version_supported | ||
+ platform :ios, 13.0 | ||
``` | ||
|
||
Then install the iOS cocoapods, by running: | ||
|
||
<InstallScripts command="npx pod-install" framework="react-native" /> | ||
|
||
The AWS SDK requires React Native applications to polyfill `crypto.getRandomValues` and `URL`. Import the [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values) and [`react-native-url-polyfill`](https://github.com/charpeni/react-native-url-polyfill) polyfills and them to the top of your application's root entry point (in most React Native apps this will be the top level `index.js`). | ||
|
||
<Example> | ||
<ExampleCode> | ||
```jsx | ||
// index.js | ||
import 'react-native-url-polyfill/auto'; | ||
import 'react-native-get-random-values'; | ||
|
||
import { AppRegistry } from 'react-native'; | ||
import App from './App'; | ||
import { name as appName } from './app.json'; | ||
|
||
AppRegistry.registerComponent(appName, () => App); | ||
``` | ||
</ExampleCode> | ||
</Example> |
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