react-app/src/api/amplifyConfig.ts
import config from "@/config";
import { Amplify } from "aws-amplify";
Amplify.configure({
Auth: {
mandatorySignIn: true,
region: config.cognito.REGION,
userPoolId: config.cognito.USER_POOL_ID,
identityPoolId: config.cognito.IDENTITY_POOL_ID,
userPoolWebClientId: config.cognito.APP_CLIENT_ID,
oauth: {
domain: config.cognito.APP_CLIENT_DOMAIN,
redirectSignIn: config.cognito.REDIRECT_SIGNIN,
redirectSignOut: config.cognito.REDIRECT_SIGNOUT,
scope: ["email", "openid"],
responseType: "code",
},
},
API: {
endpoints: [
{
name: "os",
endpoint: config.apiGateway.URL,
region: config.apiGateway.REGION,
},
],
},
});