Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

nadetastic
Copy link

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

  • Have read the Pull Request Guidelines
  • PR description included
  • Relevant documentation is changed or added (and PR referenced)
  • yarn test passes and tests are updated/added
  • No side effects or sideEffects field updated

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@nadetastic nadetastic requested a review from a team as a code owner December 26, 2023 19:43
Copy link

changeset-bot bot commented Dec 26, 2023

⚠️ No Changeset found

Latest commit: 0024ddf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@esauerbo
Copy link
Contributor

Thanks for doing this! One suggestion but otherwise LGTM

Co-authored-by: Emma Sauerborn <70536670+esauerbo@users.noreply.github.com>
esauerbo
esauerbo previously approved these changes Dec 29, 2023
Copy link
Contributor

@reesscot reesscot left a 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>
Copy link
Contributor

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.

Copy link
Author

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?

@@ -12,13 +13,15 @@ export default function AuthenticatorWithEmail() {
// custom username
username = username.toLowerCase();
attributes.email = attributes.email.toLowerCase();

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();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants