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

aws-exports.js values not generated when using override.ts #13887

Open
2 tasks done
pr0g opened this issue Aug 8, 2024 · 1 comment
Open
2 tasks done

aws-exports.js values not generated when using override.ts #13887

pr0g opened this issue Aug 8, 2024 · 1 comment
Labels
auth Issues tied to the auth category of the CLI feature-request Request a new feature override Issues related to resource override CDK functionality

Comments

@pr0g
Copy link

pr0g commented Aug 8, 2024

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v16.20.2

Amplify CLI Version

12.12.6

What operating system are you using?

macOS

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

N/A

Describe the bug

When setting OAuth values in amplify/backend/auth/<app>/override.ts, for example:

...
resources.userPoolClient.allowedOAuthFlows = ["code"];
resources.userPoolClient.allowedOAuthScopes = ["openid", "email", "profile"];
...

These values are not added to the aws-exports.js file.

If the values are added to cli-inputs.json, for example:

"oAuthMetadata": "{\"AllowedOAuthFlows\":[\"code\"],\"AllowedOAuthScopes\":[\"email\",\"openid\",\"profile\"],

The values do appear in aws-exports.js:

"oauth": {
        ...
        "scope": [
            "email",
            "openid",
            "profile"
        ],
        "responseType": "code"
        ...
    },

My understanding is these should be equivalent and override.ts is the more modern way of adding these settings.

Expected behavior

aws-exports.js contains OAuth values when set from override.ts file

Reproduction steps

  1. Use amplify/backend/auth/<app>/override.ts to add OAuth properties
    a. e.g.
    resources.userPoolClient.allowedOAuthFlows = ["code"];
    resources.userPoolClient.allowedOAuthScopes = ["openid", "email", "profile"];
    
  2. Perform an amplify push
  3. Notice aws-exports.js does not update

Project Identifier

No response

Log output

No response

Additional information

I may be misunderstanding this, and if using override.ts, there's another way of acccessing the values that are set, instead of using aws-exports.js, but I'm not sure what this process is if it exists.

Thanks!

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@pr0g pr0g added the pending-triage Issue is pending triage label Aug 8, 2024
@ykethan
Copy link
Member

ykethan commented Aug 16, 2024

Marking as feature request for improvements.

@ykethan ykethan added auth Issues tied to the auth category of the CLI feature-request Request a new feature override Issues related to resource override CDK functionality and removed pending-triage Issue is pending triage labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues tied to the auth category of the CLI feature-request Request a new feature override Issues related to resource override CDK functionality
Projects
None yet
Development

No branches or pull requests

2 participants