Skip to content

(QUESTION) How to support both email-password and phone-otp authentication with GEN 2 ? #5981

@stMerlHin

Description

@stMerlHin

I would like to allow my users to choose between login with email and password or with their phone number but doing this:

import { defineAuth } from "@aws-amplify/backend"

/**
 * Define and configure your auth resource
 * @see https://docs.amplify.aws/gen2/build-a-backend/auth
 */
export const auth = defineAuth({
  loginWith: {
    email: true,
    phone: true,
  },
})

require users to provider both email and phone number.
Please how can I achieve this (Allow user to choose between email-password and phone number for authentication) ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    authIssues related to the Auth CategoryquestionA question about the Amplify Flutter libraries

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions