aws-amplify / amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
Apache License 2.0
2.82k stars 819 forks source link

Is there a schema documentation for `config`? (coming from aws-exports.js) #13995

Open drewboardman opened 6 days ago

drewboardman commented 6 days ago

Amplify CLI Version

"aws-amplify": "^6.0.28"

Question

I am using the stand-alone authentication library. I am not interested in using the CLI or Amplify backend stuff for my app. I just want to use the Authenticator and have federated social sign-in through Google and Cognito.

One issue is that I cannot find any documentation of how to manually configure the config passed to Amplify.configure(config);. I figured out the Cognito bits:

export const cognitoConfig = {
    // socialProviders: ["Facebook", "Google"],
    Auth: {
        Cognito: {
            userPoolId: "us-east-aaa",
            userPoolClientId: "bbb",
            // Login options (optional)
            loginWith: {
                username: true,
                email: false,
                phone: false,
            },
            mfaConfiguration: "OFF",
            passwordProtectionSettings: {
                minLength: 8,
            },
            verificationMechanisms: ["EMAIL"],
        }
    }
};

This seems to be the Gen 1 solution. Since in the code, it is named LegacyConfig and there is a comment:

 * Compatibility type representing the Amplify Gen 1 configuration file schema. This type should not be used directly.

However, I can't find any documentation for setting up the social sign in for this UI library. All example/videos/documentation that are on the official website seem to rely on the amplify-cli. This is confusing to me, since the UI libraries seem to be marketed as stand-alone.

ykethan commented 5 days ago

Hey @drewboardman, thank you for reaching out. The schema for the config/outputs file in the documentation and API documentation may assist with this information.

Do let us know if you require any additional assistance.