Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Architecture AS-IS

OTP Sign In

Proposal

Solution 1 - Add isBlocked field in User DynamoDB item

Workflow:

Support agent blocks the user

Blocked user attempts login

User is blocked while logged in WL

Task breakdown

Changes in intl-notifications-service

Changes in intl-users-service

 intl-users-service
  1. Create block user endpoint

    1. Endpoint: POST /api/v1/users/block-user/{cognitoId}

    2. Add isBlocked field to user details base interface

    3. Use UpdateService to set is blocked to true

  2. Create unblock user endpoint

    1. Endpoint: POST /api/v1/users/unblock-user/{cognitoId}

    2. Use UpdateService to set is blocked to false

  3. Prevent blocked users from signing in

    1. Create UserBlockedError apollo error

    2. Add isBlocked validation in the listed resolvers:

      • createOTP

      • createLoginOTP

      • signInJWT

      • socialLogin

    3. User not found validation for reference

Changes in intl-packages

 intl-packates/packages/user
  1. Add isBlocked to userDetails type

  2. Create method to block user

    1. Should use axios to trigger a request to user service

  3. Create method to unblock user

    1. Should use axios to trigger a request to user service

Changes in intl-whitelable-graphql

 intl-whitelable-graphql
  1. Add isBlocked to userDetails type

Changes in intl-whitelable-app

Solution 2 - Disable user in cognito

  • No labels