How to setup Google OAuth into AWS Amplify Authenticator?

I have setup AWS Authenticator and got it to work as shown in the code below. This setup is working for our frontend built in React.

const awsconfig = {
  Auth: {
    Cognito: {
      userPoolClientId: import.meta.env.VITE_COGNITO_POOL_CLIENT_ID,
      userPoolId: import.meta.env.VITE_USER_POOL_ID,
    },
  },
};

Amplify.configure(awsconfig);
<Authenticator loginMechanisms={['email']}>
  // Code for the app
</Authenticator>

I would now like to add Google OAuth to this and have consulted the official documentation to do so (https://docs.amplify.aws/gen1/javascript/build-a-backend/auth/add-social-provider/). So far my setup is as follows:

// Define oauthConfig with required properties
const oauthConfig = {
  domain: 'https://demo-amplify-app.auth.us-east-1.amazoncognito.com',
  scopes: ['email', 'profile', 'openid'],
  responseType: 'code',
  redirectSignIn: [
    'http://localhost:3000/',
  ],
  redirectSignOut: [
    'http://localhost:3000/',
  ],
};

// Define userPoolConfig with user pool details
const userPoolConfig = {
  userPoolClientId: import.meta.env.VITE_COGNITO_POOL_CLIENT_ID || '',
  userPoolId: import.meta.env.VITE_USER_POOL_ID || '',
};

// Construct the awsconfig object with correct structure
const awsconfig = {
  Auth: {
    Cognito: {
      ...userPoolConfig,
      loginWith: {
        oauth: oauthConfig,
      },
    },
  },
};

Amplify.configure(awsconfig);
    <Authenticator loginMechanisms={['email']} socialProviders={['google']}>
      // Code for the app
    </Authenticator>

This seems to be the exact setup that the official docs state however I’m running into the error:

Argument of type '{ Auth: { Cognito: { loginWith: { oauth: { domain: string; scopes: string[]; responseType: string; redirectSignIn: string[]; redirectSignOut: string[]; }; }; userPoolClientId: any; userPoolId: any; }; }; }' is not assignable to parameter of type 'ResourcesConfig | LegacyConfig | AmplifyOutputs'.
  Type '{ Auth: { Cognito: { loginWith: { oauth: { domain: string; scopes: string[]; responseType: string; redirectSignIn: string[]; redirectSignOut: string[]; }; }; userPoolClientId: any; userPoolId: any; }; }; }' is not assignable to type 'ResourcesConfig'.
    Types of property 'Auth' are incompatible.
      Type '{ Cognito: { loginWith: { oauth: { domain: string; scopes: string[]; responseType: string; redirectSignIn: string[]; redirectSignOut: string[]; }; }; userPoolClientId: any; userPoolId: any; }; }' is not assignable to type 'AuthConfig | undefined'.
        Type '{ Cognito: { loginWith: { oauth: { domain: string; scopes: string[]; responseType: string; redirectSignIn: string[]; redirectSignOut: string[]; }; }; userPoolClientId: any; userPoolId: any; }; }' is not assignable to type 'Partial<AuthUserPoolAndIdentityPoolConfig & Partial<Record<never, never>>> & Pick<AuthUserPoolAndIdentityPoolConfig & Partial<...>, "Cognito">'. Type '{ Cognito: { loginWith: { oauth: { domain: string; scopes: string[]; responseType: string; redirectSignIn: string[]; redirectSignOut: string[]; }; }; userPoolClientId: any; userPoolId: any; }; }' is not assignable to type 'Partial<AuthUserPoolAndIdentityPoolConfig & Partial<Record<never, never>>>'.
            Types of property 'Cognito' are incompatible.
              Type '{ loginWith: { oauth: { domain: string; scopes: string[]; responseType: string; redirectSignIn: string[]; redirectSignOut: string[]; }; }; userPoolClientId: any; userPoolId: any; }' is not assignable to type 'CognitoUserPoolAndIdentityPoolConfig'.
                Type '{ loginWith: { oauth: { domain: string; scopes: string[]; responseType: string; redirectSignIn: string[]; redirectSignOut: string[]; }; }; userPoolClientId: any; userPoolId: any; }' is not assignable to type 'CognitoUserPoolConfig'.
                  The types of 'loginWith.oauth.responseType' are incompatible between these types.
                    Type 'string' is not assignable to type '"code" | "token"'.ts(2345)

I’m unsure how I can resolve this error. It seems according to the docs I’m using the correct type but perhaps I’m missing something. I’ve tried some other attempts and similarly get type errors when I try to run it. With that said, any assistance on this would be extremely appreciated! I’m not sure what the correct type should be to allow for the Google OAuth.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật