Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Solution 1 - Add isBlocked field in User DynamoDB item

Workflow:

Support agent blocks the user

Zenuml sequence macro lite
uuidb71e9351-b423-4ec1-ba13-9349ce24c6aa
customContentId4810997767
updatedAt2024-06-19T01:56:16Z

Blocked user attempts login

Zenuml sequence macro lite
uuid9e561ae4-39d8-4c19-81ba-99e914394741
customContentId4810997776
updatedAt2024-06-19T02:01:46Z

User is blocked while logged in WL

Zenuml sequence macro lite
uuid5495a0ee-0cbb-4042-8755-8a716fa406f1
customContentId4810965031
updatedAt2024-06-19T02:08:58Z

Task breakdown

Changes in intl-notifications-service

Changes in intl-users-service

  1. Create block user endpoint

Expand
titleintl-user-service
  • Endpoint: POST /api/v1/users/block-user/{cognitoId}

  • Add isBlocked field to user details base interface

  • Use UpdateService to set is blocked to true

  1. Create unblock user endpoint

Expand
titleintl-user-service
  • Endpoint: POST /api/v1/users/unblock-user/{cognitoId}

  • Use UpdateService to set is blocked to false

  1. Prevent blocked users from signing in

Expand
titleintl-user-service
  • Create UserBlockedError apollo error (ex:)

  • Add isBlocked validation in the listed resolvers:

    • createOTP

    • createLoginOTP

    • signInJWT

    • socialLogin

  • User not found validation for reference

Changes in intl-whitelable-graphql

  1. Add isBlocked to userDetails type

Changes in intl-whitelable-app

Solution 2 - Disable user in cognito