Resources:
  CognitoUserPool:
    Type: AWS::Cognito::UserPool
    Properties:
      UserPoolName: ${self:custom.prefix}-user-pool
      MfaConfiguration: "OFF"
      AutoVerifiedAttributes:
        - email
      EmailConfiguration:
        ReplyToEmailAddress: "no-reply@kursa-darbs-410.com"
      VerificationMessageTemplate:
        DefaultEmailOption: "CONFIRM_WITH_LINK"
        EmailSubjectByLink: "kursa-darbs-410 e-pasta verifikācija"
        EmailMessageByLink: "Lūdzu nospiediet uz sekojošās saites, lai apstiprinātu savu e-pasta adresi! {##Apstiprināt e-pastu##}."

  CognitoUserPoolClient:
    Type: AWS::Cognito::UserPoolClient
    Properties:
      ClientName: ${self:custom.prefix}-user-pool-client
      UserPoolId:
        Ref: CognitoUserPool
      ExplicitAuthFlows:
        - ADMIN_NO_SRP_AUTH
      GenerateSecret: false
      WriteAttributes:
        - name
        - email
        - birthdate
        - phone_number
        - picture
      ReadAttributes:
        - name
        - email
        - birthdate
        - phone_number
        - picture