Skip to content

Commit 040272d

Browse files
AmplifiyerGupta
andauthored
add sms configuration and custom sms sender to auth (#2429)
* add sms configuration and custom sms sender to auth * add api * update changeset --------- Co-authored-by: Gupta <[email protected]>
1 parent 9e5f63c commit 040272d

File tree

19 files changed

+802
-82
lines changed

19 files changed

+802
-82
lines changed

.changeset/curly-bags-cheer.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@aws-amplify/auth-construct': minor
3+
'@aws-amplify/backend-auth': minor
4+
'@aws-amplify/backend': minor
5+
---
6+
7+
add sms configuration and custom sms sender to auth

package-lock.json

Lines changed: 10 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/auth-construct/API.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ export type AuthProps = {
4848
externalProviders?: ExternalProviderOptions;
4949
};
5050
senders?: {
51-
email: Pick<UserPoolSESOptions, 'fromEmail' | 'fromName' | 'replyTo'> | CustomEmailSender;
51+
email?: Pick<UserPoolSESOptions, 'fromEmail' | 'fromName' | 'replyTo'> | CustomEmailSender;
52+
sms?: UserPoolSnsOptions | CustomSmsSender;
5253
};
5354
userAttributes?: UserAttributes;
5455
multifactor?: MFA;
@@ -91,6 +92,12 @@ export type CustomEmailSender = {
9192
kmsKeyArn?: string;
9293
};
9394

95+
// @public
96+
export type CustomSmsSender = {
97+
handler: IFunction;
98+
kmsKeyArn?: string;
99+
};
100+
94101
// @public
95102
export type EmailLogin = true | EmailLoginSettings;
96103

@@ -180,6 +187,13 @@ export const triggerEvents: readonly ["createAuthChallenge", "customMessage", "d
180187
// @public
181188
export type UserAttributes = StandardAttributes & Record<`custom:${string}`, CustomAttribute>;
182189

190+
// @public
191+
export type UserPoolSnsOptions = {
192+
readonly externalId?: string;
193+
readonly snsCallerArn?: string;
194+
readonly snsRegion?: string;
195+
};
196+
183197
// @public (undocumented)
184198
export type VerificationEmailWithCode = {
185199
verificationEmailStyle?: 'CODE';

0 commit comments

Comments
 (0)