Skip to content

@aws-amplify/[email protected]

Compare
Choose a tag to compare
@github-actions github-actions released this 18 Nov 22:01
· 2566 commits to main since this release
d45ab37

Major Changes

Zero-Configuration Authenticator for Angular, React, & Vue

The Authenticator has been updated based on customer feedback & real-world use-cases to deliver an improved out-of-the-box experience & greater customization.

See: RFC: Authenticator@next

Goals

  • Zero-config – The Authenticator automatically infers Amplify CLI & Admin UI settings to work out-of-the-box.

    Run `amplify pull` with the latest CLI whenever your backend changes, and the Authenticator automatically reflects the correct login mechanism, social providers, & more.
    
  • Native – The Authenticator is implemented in its respective framework (e.g. Angular, React, Vue) for consistency & familiarity.

  • Stable – Existing & upcoming Authenticator behavior is captured & tested to reduce & prevent regressions.

    [Authenticator behavior](https://github.com/aws-amplify/amplify-ui/tree/main/packages/e2e/features/ui/components/authenticator) is tested as [E2E tests](https://github.com/aws-amplify/amplify-ui/blob/main/CONTRIBUTING.md#e2e-testing) on every PR.
    
  • Interoperable – Work with password managers, autofill, existing styles, & other common features.

  • Customizable – More ways to customize the UI & behavior without losing the benefits of the Authenticator.

    Customers have access to the same functionality that the `Authenticator` uses internally to even build a 100% custom Authenticator, without sacrificing any of the logic.
    
  • Reproducible – Authentication is complex. The Authenticator is is developed & tested against a myriad of Amplify backends, example apps, and specifications.

Check out our environments and examples for more.


Learn more by visiting the Authenticator Documentation.

Minor Changes

  • #626 f84e9949b Thanks @ericclemmons! - ## Zero Configuration

    As of @aws-amplify/[email protected], aws-exports.js includes your backend configuration for the Authenticator to automatically infer loginMechanisms and socialProviders.

    Before (React)

    export default withAuthenticator(App, {
      loginMechanisms: ['email'],
      socialProviders: ['amazon', 'apple', 'facebook', 'google'],
    });

    After (React)

    export default withAuthenticator(App);

    Sign in with Apple

    The Authenticator supports apple as one of many socialProviders. See: https://docs.amplify.aws/lib/auth/social/q/platform/js/

  • #627 bd3e09a09 Thanks @wlee221! - This implements AuthenticatorService that can be used internally and externally to access common Authenticator context and helpers.

    Usage:

    app.component.ts

    export class AppComponent {
      constructor(public authenticator: AuthenticatorService) {}
    }

    app.component.html

    <!-- example of "reset password" button -->
    <button (click)="authenticator.toResetPassword()">Reset password</button>
    
    <!-- example of "sign up" submit button -->
    <button (click)="authenticator.submitForm()">Sign Up</button>
    
    <!-- disabling the submit button if submission is in progress -->
    <button
      (click)="authenticator.submitForm()"
      [disabled]="authenticator.isPending"
    >
      Sign Up
    </button>

Patch Changes