Open hackrx opened 3 years ago
Please take a look at this comment https://github.com/aws-amplify/amplify-flutter/issues/822#issuecomment-902853498 The tip for bug 0 may help to resolve this (Not 100% sure).
@HuiSF can you please elaborate more on the solution? cli.json
doesn't have anything related to auth. if possible please give a descriptive solution.
I meant you may need to make a schema change so when you do push the cli will actually push a new configuration archive to the cloud including the new endpoint information.
can you please tell me if there is any way to update the "WebDomain":
under Auth -> Default -> OAuth in amplifyconfiguration.dart file?
I have my own custom domain added in cognito, and it works if I change the "WebDomain" manually in the amplifyconfiguration.dart
file. But every time if I am making a push or pull, it just reset its value and assigns the auth.us.-east-2.amazoncognito.com
domain to it.
@hackrx I did some digging and this is currently a limitation in the CLI. As you can see here, where the CLI generates the amplify config, the value for WebDomain
cannot be a custom value outside of the amazoncognito.com
subdomains.
I hope this helps and sorry for the inconvenience!
Here is my workaround, please let me know if it sucks: awsExports.oauth.domain.replace(/\.auth\..*\.amazoncognito.com/, '')
Hope it doesn't, and that it helps someone out there
I'm an iOS engineer, I will do in my fastlane file run shell script to replace the string
sed -i '' 's/want_to_replace.auth.us-east-1.amazoncognito.com/your_custom_domain/g' ../awsconfiguration.json
but anyways... this is still not quite convenient
Describe the bug Amplify provides a domain like
https://xxxxx.auth.us-east-2.amazoncognito.com
as Cognito domain, I am able to add my own domain. I want to update this custom domain as the default domain used by amplify. Every time I push or pull the changes myamplifyconfiguration.dart
file updates with theWebDomain
provided by Cognito, and I need to manually update it, to use my own custom domain.link to the issue comment
amplifyconfiguration.dart [File which I need to update after each push]