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?
fix: Update override function calls reference to v6 #4872
Conversation
|
...nnected-components/authenticator/customization/customization.override-function-calls.web.mdx
Outdated
Show resolved
Hide resolved
Thanks for doing this! One suggestion but otherwise LGTM |
Co-authored-by: Emma Sauerborn <70536670+esauerbo@users.noreply.github.com>
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.
We shouldn't fully remove this from the UI docs since most customers will still be using v5. We should show both versions on the page in a Tabs component.
@@ -31,32 +31,32 @@ Each `handle*` function will return the neccessary values you'll need to make th | |||
</TableHead> | |||
<TableBody> | |||
<TableRow> | |||
<ResponsiveTableCell label="Function Call">`Auth.signUp`</ResponsiveTableCell> |
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?
...omponents/authenticator/customization/customization.override-function-calls.react-native.mdx
Outdated
Show resolved
Hide resolved
…om/nadetastic/amplify-ui into local branch of fix/override-function-calls
@@ -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 comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add amend this to options.userAttributes.email = options.userAttributes.email.toLowerCase();
please?
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Same here I believe :)
https://github.com/aws-amplify/amplify-ui/pull/4872/files#r1522794298
Description of changes
The override function calls for Authenticator reference APIs as they appear in v5 of
aws-amplify
. This PR updates them to reference usage in v6.Issue #, if available
N/A
Description of how you validated changes
Checklist
yarn test
passes and tests are updated/addedsideEffects
field updatedBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.