Skip to content

Commit 36667be

Browse files
authored
Update custom pre-sign up handler (#1051)
1 parent 3b5b4ed commit 36667be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ When prompted to edit the function now, choose "yes" and add the following code
256256
created by the amplify CLI, from [documentation](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html#aws-lambda-triggers-pre-registration-example-2).
257257

258258
```js
259-
exports.handler = (event, context, callback) => {
259+
exports.handler = async event => {
260260
// Confirm the user
261261
event.response.autoConfirmUser = true;
262262

@@ -271,7 +271,7 @@ exports.handler = (event, context, callback) => {
271271
}
272272

273273
// Return to Amazon Cognito
274-
callback(null, event);
274+
return event;
275275
};
276276
```
277277

0 commit comments

Comments
 (0)