-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Update override function calls reference to v6 #4872
base: main
Are you sure you want to change the base?
Changes from all commits
bc5ec5c
39d3adf
3513dda
94fe27a
5268e38
0024ddf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
```jsx{8} | ||
import { Amplify, Auth } from 'aws-amplify'; | ||
import { Amplify } from 'aws-amplify'; | ||
import { signUp } from 'aws-amplify/auth'; | ||
import { Authenticator } from '@aws-amplify/ui-react'; | ||
import '@aws-amplify/ui-react/styles.css'; | ||
import awsExports from './aws-exports'; | ||
Amplify.configure(awsExports); | ||
import amplifyconfig from './amplifyconfiguration.json'; | ||
Amplify.configure(amplifyconfig); | ||
|
||
export default function AuthenticatorWithEmail() { | ||
const services = { | ||
|
@@ -12,13 +13,15 @@ export default function AuthenticatorWithEmail() { | |
// custom username | ||
username = username.toLowerCase(); | ||
attributes.email = attributes.email.toLowerCase(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add amend this to |
||
return Auth.signUp({ | ||
return signUp({ | ||
username, | ||
password, | ||
attributes, | ||
autoSignIn: { | ||
enabled: true, | ||
}, | ||
options: { | ||
userAttributes: { | ||
...attributes | ||
}, | ||
autoSignIn: true | ||
} | ||
}); | ||
}, | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
```html | ||
<script setup lang="ts"> | ||
import { Amplify, Auth } from 'aws-amplify'; | ||
import { Amplify } from 'aws-amplify'; | ||
import { signUp } from 'aws-amplify/auth'; | ||
import { Authenticator } from '@aws-amplify/ui-vue'; | ||
import '@aws-amplify/ui-vue/styles.css'; | ||
import aws_exports from './aws-exports'; | ||
Amplify.configure(aws_exports); | ||
import amplifyconfig from './amplifyconfiguration'; | ||
Amplify.configure(amplifyconfig); | ||
|
||
const services = { | ||
async handleSignUp(formData) { | ||
let { username, password, attributes } = formData; | ||
// custom username | ||
username = username.toLowerCase(); | ||
attributes.email = attributes.email.toLowerCase(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here I believe :) |
||
return Auth.signUp({ | ||
return signUp({ | ||
username, | ||
password, | ||
attributes, | ||
autoSignIn: { | ||
enabled: true, | ||
}, | ||
options: { | ||
userAttributes: { | ||
...attributes | ||
}, | ||
autoSignIn: true | ||
} | ||
}); | ||
}, | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we still have customers using v5, we should keep both versions in the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed a commit that adds a v5 column @reesscot how does this look?