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

OAuthScope type definition contains "email" twice #14016

Closed
3 tasks done
steinsag opened this issue Nov 15, 2024 · 4 comments · Fixed by #14017
Closed
3 tasks done

OAuthScope type definition contains "email" twice #14016

steinsag opened this issue Nov 15, 2024 · 4 comments · Fixed by #14017
Assignees
Labels
Auth Related to Auth components/category bug Something isn't working

Comments

@steinsag
Copy link
Contributor

Before opening, please confirm:

JavaScript Framework

Not applicable

Amplify APIs

Authentication

Amplify Version

v6

Amplify Categories

auth

Backend

Other

Environment information

# Put output below this line
  System:
    OS: Linux 6.11 CentOS Stream 9
    CPU: (32) x64 AMD Ryzen
    Container: Yes
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
  Browsers:
    Chrome: 131.0.6778.69
  npmPackages:
    ...
    aws-amplify: ^6.8.2 => 6.8.2 
    aws-amplify/adapter-core:  undefined ()
    aws-amplify/analytics:  undefined ()
    aws-amplify/analytics/kinesis:  undefined ()
    aws-amplify/analytics/kinesis-firehose:  undefined ()
    aws-amplify/analytics/personalize:  undefined ()
    aws-amplify/analytics/pinpoint:  undefined ()
    aws-amplify/api:  undefined ()
    aws-amplify/api/server:  undefined ()
    aws-amplify/auth:  undefined ()
    aws-amplify/auth/cognito:  undefined ()
    aws-amplify/auth/cognito/server:  undefined ()
    aws-amplify/auth/enable-oauth-listener:  undefined ()
    aws-amplify/auth/server:  undefined ()
    aws-amplify/data:  undefined ()
    aws-amplify/data/server:  undefined ()
    aws-amplify/datastore:  undefined ()
    aws-amplify/in-app-messaging:  undefined ()
    aws-amplify/in-app-messaging/pinpoint:  undefined ()
    aws-amplify/push-notifications:  undefined ()
    aws-amplify/push-notifications/pinpoint:  undefined ()
    aws-amplify/storage:  undefined ()
    aws-amplify/storage/s3:  undefined ()
    aws-amplify/storage/s3/server:  undefined ()
    aws-amplify/storage/server:  undefined ()
    aws-amplify/utils:  undefined ()

Describe the bug

https://github.com/aws-amplify/amplify-js/blob/main/packages/core/src/singleton/Auth/types.ts#L197 contains twice email, which is most probably wrong:

export type OAuthScope =
	| 'email'
	| 'openid'
	| 'phone'
	| 'email'     <<<<<<<----------- second time
	| 'profile'
	| 'aws.cognito.signin.user.admin'
	| CustomScope;

Expected behavior

type definition should be clean

Reproduction steps

none

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Nov 15, 2024
@cwomack cwomack self-assigned this Nov 15, 2024
@cwomack cwomack added the Auth Related to Auth components/category label Nov 15, 2024
@cwomack
Copy link
Member

cwomack commented Nov 15, 2024

@steinsag, thanks for opening this issue! Looks like we indeed have the type duplicated here. Appreciate the links directly to it and will review with the team to get this fixed.

@cwomack cwomack added bug Something isn't working and removed pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Nov 15, 2024
@steinsag
Copy link
Contributor Author

@cwomack added a small PR, but feel free to get this changed by the experts :-)

@github-actions github-actions bot added the pending-maintainer-response Issue is pending a response from the Amplify team. label Nov 15, 2024
@cwomack
Copy link
Member

cwomack commented Nov 15, 2024

Excellent! Thanks for taking the time to do that, @steinsag.

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Nov 15, 2024
@HuiSF
Copy link
Member

HuiSF commented Nov 19, 2024

The PR has merged thanks for your contribution @steinsag the code change will be released next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auth Related to Auth components/category bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants