Skip to content

Commit d4569c7

Browse files
committed
fix merge conflict
2 parents 9d8c265 + 8af6ee5 commit d4569c7

File tree

29 files changed

+14451
-143
lines changed

29 files changed

+14451
-143
lines changed

STYLEGUIDE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ Conform to the [JSON standard](https://www.json.org/json-en.html).
299299
}
300300
```
301301

302+
* * *
303+
302304
## 19. Prefix AWS and Amazon products when they first appear on a page
303305

304306
When an AWS service or product appears on the page for the first time, refer to it with the appropriate prefix, either AWS or Amazon. You can [find a full listing here.](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/)
@@ -324,6 +326,8 @@ When editing text content in markdown files use the markdown syntax for links. W
324326

325327
`\[Use mdx link syntax](/some-link)`
326328

329+
* * *
330+
327331
## 21. Use 2-space indents for code blocks
328332

329333
When adding code blocks and indenting encapsulated code, use 2 spaces for each indent
@@ -348,4 +352,4 @@ Amplify.configure({
348352
// ...
349353
}
350354
});
351-
```
355+
```

cspell.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,7 @@
742742
"jcenter",
743743
"jdoe",
744744
"jetbrains",
745+
"Jetpack",
745746
"jobTitle",
746747
"jpg",
747748
"js",

customHttp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ customHeaders:
1313
- key: 'X-Content-Type-Options'
1414
value: 'nosniff'
1515
- key: 'Content-Security-Policy'
16-
value: "upgrade-insecure-requests; default-src 'none'; prefetch-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-src 'self' https://www.youtube-nocookie.com https://aws.demdex.net https://dpm.demdex.net; connect-src 'self' *.shortbread.aws.dev https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://d2c.aws.amazon.com https://vs.aws.amazon.com https://*.algolia.net https://*.algolianet.com *.amazonaws.com https://docs-backend.amplify.aws; img-src 'self' https://img.shields.io cm.everesttech.net https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/; media-src 'self'; script-src 'self' https://a0.awsstatic.com/;"
16+
value: "upgrade-insecure-requests; default-src 'none'; prefetch-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; frame-src 'self' https://www.youtube-nocookie.com https://aws.demdex.net https://dpm.demdex.net; connect-src 'self' *.shortbread.aws.dev https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/ https://d2c.aws.amazon.com https://vs.aws.amazon.com https://*.algolia.net https://*.algolianet.com *.amazonaws.com https://aws.amazon.com/; img-src 'self' https://img.shields.io https://amazonwebservices.d2.sc.omtrdc.net https://aws.demdex.net https://dpm.demdex.net https://cm.everesttech.net https://a0.awsstatic.com/; media-src 'self'; script-src 'self' https://a0.awsstatic.com/ https://d2c.aws.amazon.com/;"
1717
# CSP also set in _document.tsx meta tag

src/components/LandingHeroCTA/index.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,28 @@ export default function LandingHeroCTA() {
1313
<Link href="/start/q/integration/react?sc_icampaign=react-start&sc_ichannel=docs-home">
1414
<img alt={img.REACT.alt} height={40} width={40} src={img.REACT.src} />
1515
</Link>
16+
<Link href="/start/q/integration/next?sc_icampaign=nextjs-start&sc_ichannel=docs-home">
17+
<img alt={img.NEXT.alt} height={40} width={40} src={img.NEXT.src} />
18+
</Link>
19+
<Link href="/start/q/integration/react-native?sc_icampaign=react-native-start&sc_ichannel=docs-home">
20+
<img
21+
alt={img.REACTNATIVE.alt}
22+
height={40}
23+
width={40}
24+
src={img.REACTNATIVE.src}
25+
/>
26+
</Link>
1627
<Link href="/start/q/integration/vue?sc_icampaign=vue-start&sc_ichannel=docs-home">
1728
<img alt={img.VUE.alt} height={40} width={40} src={img.VUE.src} />
1829
</Link>
30+
<Link href="/start/q/integration/angular?sc_icampaign=js-start&sc_ichannel=docs-home">
31+
<img
32+
alt={img.ANGULAR.alt}
33+
height={40}
34+
width={40}
35+
src={img.ANGULAR.src}
36+
/>
37+
</Link>
1938
<Link href="/start/q/integration/js?sc_icampaign=js-start&sc_ichannel=docs-home">
2039
<img alt={img.JS.alt} height={40} width={40} src={img.JS.src} />
2140
</Link>

src/directory/directory.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2281,7 +2281,7 @@ export const directory = {
22812281
{
22822282
title: 'Connect to the cloud',
22832283
route: '/start/getting-started/add-api',
2284-
filters: ['android', 'ios', 'flutter']
2284+
filters: ['android', 'ios']
22852285
},
22862286
{
22872287
title: 'Connect API and database to the app',

src/fragments/lib-v1/auth/native_common/signin_next_steps/common.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import ios2 from "/src/fragments/lib-v1/auth/ios/signin_next_steps/30_confirm_cu
2121
import ios3 from "/src/fragments/lib-v1/auth/ios/signin_next_steps/40_confirm_new_password.mdx";
2222

2323
<Fragments fragments={{ios: ios3}} />
24-
24+
2525
### Reset password
2626

2727
import ios4 from "/src/fragments/lib-v1/auth/ios/signin_next_steps/50_reset_password.mdx";

src/fragments/lib-v1/flutter.mdx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
Welcome to the Amplify Flutter documentation. To stay up to date with the latest changes and provide feedback, please take a look at our [Github repo](https://github.com/aws-amplify/amplify-flutter) or join us on [Discord](https://discord.gg/jWVbPfC).
44

5-
The stable release of Amplify Flutter currently supports iOS/Android as target platforms.
6-
7-
This guide shows how to build an app using our Amplify Libraries for Flutter and the Amplify CLI toolchain.
5+
Amplify Flutter v0 currently supports iOS/Android as target platforms.
86

97
<InternalLinkButton href="/lib-v1/project-setup/prereq">
108
<span slot="text">Get Started</span>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Callout info>
2+
3+
**New**: The Authenticator UI component for Android via Jetpack Compose is now available in developer preview!
4+
5+
Once you've gone through the steps below, you can use it to automatically [add authentication capabilities to your application](#option-1-use-the-authenticator-ui-component).
6+
7+
</Callout>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Authentication with Amplify
2+
3+
There are two ways to add authentication capabilities to your application.
4+
5+
### Option 1: Use the Authenticator UI component
6+
<Callout warning>
7+
8+
**Note:** The Authenticator UI component is only available with Jetpack Compose.
9+
10+
</Callout>
11+
12+
The **Authenticator** is a UI component that automatically integrates with your existing Amplify configuration and allows you to easily add the entire authentication flow to your application.
13+
14+
Visit [Authenticator | Amplify UI for Android](https://ui.docs.amplify.aws/android/connected-components/authenticator) to get started.
15+
16+
### Option 2: Manually call the Authentication APIs
17+
18+
Follow the instructions in [Sign In](/lib/auth/signin) to learn about how to integrate the registration and authentication flows in your application with the Auth APIs.

src/fragments/lib/auth/android/signin_next_steps/10_signin.mdx

Lines changed: 74 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -36,32 +36,33 @@ try {
3636
// Then invoke `confirmSignIn` api with new password
3737
break;
3838
}
39-
case RESET_PASSWORD: {
40-
Log.i("AuthQuickstart", "Reset password, additional info: " + nextStep.getAdditionalInfo());
41-
// User needs to reset their password.
42-
// Invoke `resetPassword` api to start the reset password
43-
// flow, and once reset password flow completes, invoke
44-
// `signIn` api to trigger signIn flow again.
45-
break;
46-
}
47-
case CONFIRM_SIGN_UP: {
48-
Log.i("AuthQuickstart", "Confirm signup, additional info: " + nextStep.getAdditionalInfo());
49-
// User was not confirmed during the signup process.
50-
// Invoke `confirmSignUp` api to confirm the user if
51-
// they have the confirmation code. If they do not have the
52-
// confirmation code, invoke `resendSignUpCode` to send the
53-
// code again.
54-
// After the user is confirmed, invoke the `signIn` api again.
55-
break;
56-
}
5739
case DONE: {
5840
Log.i("AuthQuickstart", "SignIn complete");
5941
// User has successfully signed in to the app
6042
break;
6143
}
6244
}
6345
},
64-
error -> Log.e("AuthQuickstart", "SignIn failed: " + error)
46+
error -> {
47+
if (error instanceof UserNotConfirmedException) {
48+
// User was not confirmed during the signup process.
49+
// Invoke `confirmSignUp` api to confirm the user if
50+
// they have the confirmation code. If they do not have the
51+
// confirmation code, invoke `resendSignUpCode` to send the
52+
// code again.
53+
// After the user is confirmed, invoke the `signIn` api again.
54+
Log.i("AuthQuickstart", "Signup confirmation required" + error);
55+
} else if (error instanceof PasswordResetRequiredException) {
56+
// User needs to reset their password.
57+
// Invoke `resetPassword` api to start the reset password
58+
// flow, and once reset password flow completes, invoke
59+
// `signIn` api to trigger signIn flow again.
60+
Log.i("AuthQuickstart", "Password reset required" + error);
61+
} else {
62+
Log.e("AuthQuickstart", "SignIn failed: " + error);
63+
}
64+
}
65+
6566
);
6667
} catch (Exception error) {
6768
Log.e("AuthQuickstart", "Unexpected error occurred: " + error);
@@ -98,22 +99,6 @@ try {
9899
// Prompt the user to enter a new password
99100
// Then invoke `confirmSignIn` api with new password
100101
}
101-
AuthSignInStep.RESET_PASSWORD -> {
102-
Log.i("AuthQuickstart", "Reset password, additional info: ${nextStep.additionalInfo}")
103-
// User needs to reset their password.
104-
// Invoke `resetPassword` api to start the reset password
105-
// flow, and once reset password flow completes, invoke
106-
// `signIn` api to trigger signIn flow again.
107-
}
108-
AuthSignInStep.CONFIRM_SIGN_UP -> {
109-
Log.i("AuthQuickstart", "Confirm signup, additional info: ${nextStep.additionalInfo}")
110-
// User was not confirmed during the signup process.
111-
// Invoke `confirmSignUp` api to confirm the user if
112-
// they have the confirmation code. If they do not have the
113-
// confirmation code, invoke `resendSignUpCode` to send the
114-
// code again.
115-
// After the user is confirmed, invoke the `signIn` api again.
116-
}
117102
AuthSignInStep.DONE -> {
118103
Log.i("AuthQuickstart", "SignIn complete")
119104
// User has successfully signed in to the app
@@ -122,8 +107,24 @@ try {
122107

123108
}
124109
) { error ->
125-
Log.e("AuthQuickstart", "SignIn failed: $error")
126-
}
110+
if (error is UserNotConfirmedException) {
111+
// User was not confirmed during the signup process.
112+
// Invoke `confirmSignUp` api to confirm the user if
113+
// they have the confirmation code. If they do not have the
114+
// confirmation code, invoke `resendSignUpCode` to send the
115+
// code again.
116+
// After the user is confirmed, invoke the `signIn` api again.
117+
Log.i("AuthQuickstart", "Signup confirmation required", error)
118+
} else if (error is PasswordResetRequiredException) {
119+
// User needs to reset their password.
120+
// Invoke `resetPassword` api to start the reset password
121+
// flow, and once reset password flow completes, invoke
122+
// `signIn` api to trigger signIn flow again.
123+
Log.i("AuthQuickstart", "Password reset required", error)
124+
} else {
125+
Log.e("AuthQuickstart", "Unexpected error occurred: $error")
126+
}
127+
}
127128
} catch (error: Exception) {
128129
Log.e("AuthQuickstart", "Unexpected error occurred: $error")
129130
}
@@ -163,29 +164,29 @@ try {
163164
// Prompt the user to enter a new password
164165
// Then invoke `confirmSignIn` api with new password
165166
}
166-
AuthSignInStep.RESET_PASSWORD -> {
167-
Log.i("AuthQuickstart", "Reset password, additional info: ${nextStep.additionalInfo}")
168-
// User needs to reset their password.
169-
// Invoke `resetPassword` api to start the reset password
170-
// flow, and once reset password flow completes, invoke
171-
// `signIn` api to trigger signIn flow again.
172-
}
173-
AuthSignInStep.CONFIRM_SIGN_UP -> {
174-
Log.i("AuthQuickstart", "Confirm signup, additional info: ${nextStep.additionalInfo}")
175-
// User was not confirmed during the signup process.
176-
// Invoke `confirmSignUp` api to confirm the user if
177-
// they have the confirmation code. If they do not have the
178-
// confirmation code, invoke `resendSignUpCode` to send the
179-
// code again.
180-
// After the user is confirmed, invoke the `signIn` api again.
181-
}
182167
AuthSignInStep.DONE -> {
183168
Log.i("AuthQuickstart", "SignIn complete")
184169
// User has successfully signed in to the app
185170
}
186171
}
187172
} catch (error: Exception) {
188-
Log.e("AuthQuickstart", "Unexpected error occurred: $error")
173+
if (error is UserNotConfirmedException) {
174+
// User was not confirmed during the signup process.
175+
// Invoke `confirmSignUp` api to confirm the user if
176+
// they have the confirmation code. If they do not have the
177+
// confirmation code, invoke `resendSignUpCode` to send the
178+
// code again.
179+
// After the user is confirmed, invoke the `signIn` api again.
180+
Log.i("AuthQuickstart", "Signup confirmation required", error)
181+
} else if (error is PasswordResetRequiredException) {
182+
// User needs to reset their password.
183+
// Invoke `resetPassword` api to start the reset password
184+
// flow, and once reset password flow completes, invoke
185+
// `signIn` api to trigger signIn flow again.
186+
Log.i("AuthQuickstart", "Password reset required", error)
187+
} else {
188+
Log.e("AuthQuickstart", "Unexpected error occurred: $error")
189+
}
189190
}
190191
```
191192

@@ -220,32 +221,32 @@ RxAmplify.Auth.signIn("username", "password", options).subscribe(
220221
// Then invoke `confirmSignIn` api with new password
221222
break;
222223
}
223-
case RESET_PASSWORD: {
224-
Log.i("AuthQuickstart", "Reset password, additional info: " + nextStep.getAdditionalInfo());
225-
// User needs to reset their password.
226-
// Invoke `resetPassword` api to start the reset password
227-
// flow, and once reset password flow completes, invoke
228-
// `signIn` api to trigger signIn flow again.
229-
break;
230-
}
231-
case CONFIRM_SIGN_UP: {
232-
Log.i("AuthQuickstart", "Confirm signup, additional info: " + nextStep.getAdditionalInfo());
233-
// User was not confirmed during the signup process.
234-
// Invoke `confirmSignUp` api to confirm the user if
235-
// they have the confirmation code. If they do not have the
236-
// confirmation code, invoke `resendSignUpCode` to send the
237-
// code again.
238-
// After the user is confirmed, invoke the `signIn` api again.
239-
break;
240-
}
241224
case DONE: {
242225
Log.i("AuthQuickstart", "SignIn complete");
243226
// User has successfully signed in to the app
244227
break;
245228
}
246229
}
247230
},
248-
error -> Log.e("AuthQuickstart", "SignIn failed: " + error)
231+
error -> {
232+
if (error instanceof UserNotConfirmedException) {
233+
// User was not confirmed during the signup process.
234+
// Invoke `confirmSignUp` api to confirm the user if
235+
// they have the confirmation code. If they do not have the
236+
// confirmation code, invoke `resendSignUpCode` to send the
237+
// code again.
238+
// After the user is confirmed, invoke the `signIn` api again.
239+
Log.i("AuthQuickstart", "Signup confirmation required" + error);
240+
} else if (error instanceof PasswordResetRequiredException) {
241+
// User needs to reset their password.
242+
// Invoke `resetPassword` api to start the reset password
243+
// flow, and once reset password flow completes, invoke
244+
// `signIn` api to trigger signIn flow again.
245+
Log.i("AuthQuickstart", "Password reset required" + error);
246+
} else {
247+
Log.e("AuthQuickstart", "SignIn failed: " + error);
248+
}
249+
}
249250
);
250251
```
251252

0 commit comments

Comments
 (0)