File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/fragments/lib/auth/js Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,24 @@ async function confirmSignUp() {
68
68
}
69
69
```
70
70
71
+ As part of the options parameter, you can specify the ` forceAliasCreation ` boolean. By default
72
+ set to ` True ` . If set to ` False ` and the email or phone number used for sign up confirmation
73
+ already exists as an alias for a different user, the API will throw an ` AliasExistsException `
74
+ error. If set to ` True ` , the API call will migrate the alias from the previous user to
75
+ a newly created user.
76
+
77
+ ``` js
78
+ import { Auth } from ' aws-amplify' ;
79
+
80
+ async function confirmSignUp () {
81
+ try {
82
+ await Auth .confirmSignUp (username, code, { forceAliasCreation: false });
83
+ } catch (error) {
84
+ console .log (' error confirming sign up' , error);
85
+ }
86
+ }
87
+ ```
88
+
71
89
### Auto sign in after sign up
72
90
73
91
If you enabled ` autoSignIn ` , the ` sign up ` function will dispatch ` autoSignIn ` hub event after successful confirmation.
You can’t perform that action at this time.
0 commit comments