-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix: relax config for AmplifyOutputs #13234
Conversation
@@ -38,19 +30,19 @@ export interface AmplifyOutputsAuthProperties { | |||
require_symbols: boolean; | |||
}; | |||
oauth?: { | |||
identity_providers: AmplifyOutputsOAuthIdentityProvider[]; | |||
identity_providers: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we making this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeScript complains when importing the JSON file
@@ -130,34 +127,27 @@ function parseAuth( | |||
domain: oauth.domain, | |||
redirectSignIn: oauth.redirect_sign_in_uri, | |||
redirectSignOut: oauth.redirect_sign_out_uri, | |||
responseType: oauth.response_type, | |||
responseType: oauth.response_type === 'token' ? 'token' : 'code', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: What might this be other than 'token'
? Just wondering if we can just do
responseType: oauth.response_type ?? 'code',
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to show both options to make it more readable
@@ -0,0 +1,72 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for this <3
Description of changes
Relax types of
AmplifyOutputs
to prevent TypeScript problems while importing JSON file, also updating with latests schema.Issue #, if available
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.