Closed quarryman closed 1 year ago
Hey @quarryman :wave: thanks for raising this! Unfortunately we do not support extending the CLI-generated aws-exports.js
file, however modifications can be applied when passing these exports to Amplify.configure
:
import { Amplify } from 'aws-amplify'
import awsExports from './aws-exports'
Amplify.configure({
...awsExports,
Auth: {
cookieStorage: { /* some modifications */ }
}
})
Thanx, that solves my case completely.
Describe the bug Once amplify project is initialized with amplify cli, aws-export.js is autogenerated based on prompts you answer. File is clearly not meant for editing as it should remain under cli control and can be overriden.
Once one needs to add extra configuration for Auth module, like setting storage to cookies instead of localstorage, there is no clear option how to do it, as file is uneditable and CLI doesnt provide prompt to config this particular value when you add Auth module using 'amplify add auth'
Along with that authgenerated file structure is much different from one that is referenced in documentation
autogenerated file structure: