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

Customizing authenticator #5781

Open
vipinkashyap opened this issue Dec 17, 2024 · 6 comments
Open

Customizing authenticator #5781

vipinkashyap opened this issue Dec 17, 2024 · 6 comments
Assignees
Labels
Authenticator Issues related to the Authenticator UI Component pending-maintainer-response Pending response from a maintainer of this repository question A question about the Amplify Flutter libraries

Comments

@vipinkashyap
Copy link

vipinkashyap commented Dec 17, 2024

I have email and phone login setup on my cognito group. The authenticator widget shows both ways of logging in email and phone.

I only want to show phone login and signup . How do i do this ? How do i customize the authenticator? This is a common use case how would you suggest i go about this ?

I dont want to disturb any cognito settings . Im mostly looking for a way to do this on the front end. Because it looks like i cant edit the aws cognito config to only allow for phone auth.

@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Dec 17, 2024
@ekjotmultani
Copy link
Member

ekjotmultani commented Dec 17, 2024

Hi @vipinkashyap, thank you for your question. Have you set up phone as the main log in property in the Amplify backend?. For further reference on UI customization for Authenticator, please see here.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 17, 2024
@ekjotmultani ekjotmultani self-assigned this Dec 17, 2024
@ekjotmultani ekjotmultani added the question A question about the Amplify Flutter libraries label Dec 17, 2024
@github-actions github-actions bot removed the pending-triage This issue is in the backlog of issues to triage label Dec 17, 2024
@vipinkashyap
Copy link
Author

vipinkashyap commented Dec 17, 2024

Hi @ekjotmultani

This is the aws cognito config. Ive already read the documentation on authenticator and it seems like either this use case is not discussed or missed. Let me know what other information you need.

image

For verifying
image

For signup
image

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Dec 17, 2024
@ekjotmultani
Copy link
Member

Hi @vipinkashyap, thank you for the added information. Could you share your backend.ts file from your amplify app?

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 18, 2024
@vipinkashyap
Copy link
Author

vipinkashyap commented Dec 18, 2024

Im not using amplify for my backend this is a amplify gen1 flutter app using a custom backend. I can share my awsconfiguration with you if youd like with pii hidden.

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Dec 18, 2024
@ekjotmultani
Copy link
Member

Hi @vipinkashyap, I would appreciate that, it will help us investigate the issue and try to find a solution

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 18, 2024
@ekjotmultani ekjotmultani added the Authenticator Issues related to the Authenticator UI Component label Dec 18, 2024
@vipinkashyap
Copy link
Author

Heres the config @ekjotmultani

{
  "UserAgent": "aws-amplify-cli/2.0",
  "Version": "1.0",
  "storage": {
    "plugins": {
      "awsS3StoragePlugin": {
        "bucket": "test-bucket-name",
        "region": "us-west-2"
      }
    }
  },
  "auth": {
    "plugins": {
      "awsCognitoAuthPlugin": {
        "UserAgent": "aws-amplify-cli/0.1.0",
        "Version": "0.1.0",
        "IdentityManager": {
          "Default": {}
        },
        "CredentialsProvider": {
          "CognitoIdentity": {
            "Default": {
              "PoolId": "us-west-2:*****-****-***-****-*********",
              "Region": "us-west-2"
            }
          }
        },
        "CognitoUserPool": {
          "Default": {
            "PoolId": "us-west-2_******",
            "AppClientId": "********",
            "AppClientSecret": "********",
            "Region": "us-west-2"
          }
        },
        "Auth": {
          "Default": {
            "authenticationFlowType": "USER_SRP_AUTH",
            "socialProviders": [],
            "usernameAttributes": [
              "username",
              "email",
              "phone_number"
            ],
            "signupAttributes": [
              "username",
              "name",
              "middle_name",
              "family_name",
              "email",
              "phone_number"
            ],
            "passwordProtectionSettings": {
              "passwordPolicyMinLength": 8,
              "passwordPolicyCharacters": []
            },
            "mfaConfiguration": "OPTIONAL",
            "mfaTypes": [
              "SMS",
              "TOTP"
            ],
            "verificationMechanisms": [
              "EMAIL"
            ]
          }
        },
        "S3TransferUtility": {
          "Default": {
            "Bucket": "test-bucket-name",
            "Region": "us-west-2"
          }
        }
      }
    }
  },
  "analytics": {
    "plugins": {
      "awsPinpointAnalyticsPlugin": {
        "pinpointAnalytics": {
          "appId": "**********",
          "region": "us-west-2"
        },
        "pinpointTargeting": {
          "region": "us-west-2"
        }
      }
    }
  },
  "api": {
    "plugins": {
      "awsAPIPlugin": {
        "Test API": {
          "endpointType": "GraphQL",
          "endpoint": "https://*************.appsync-api.us-west-2.amazonaws.com/graphql",
          "region": "us-west-2",
          "authorizationType": "AMAZON_COGNITO_USER_POOLS"
        }
      }
    }
  }
}

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authenticator Issues related to the Authenticator UI Component pending-maintainer-response Pending response from a maintainer of this repository question A question about the Amplify Flutter libraries
Projects
None yet
Development

No branches or pull requests

2 participants