• Verify email handler

    Parameters

    • authAPI: Pick<AuthDefaultAdapterAPI, "checkToken">

      injected API to handle the authentication related operations

      • checkToken
    • userService: UserDataService

      injected service use to handle the user related operations

      • updateUser
    • logger: Logger

      injected logger used to handle the logging

    • context: AdapterHandlerContext

      request context [headers, body, params, query].

    Returns Promise<adapter.AdapterHandlerResponse>

    204 Status No Content

    Description

    This handler will verify email by applying the following steps in sequence:

    1. Get token from context.headers

    2. Verify token (authAPI.checkToken)

    3. Get userId from token

    4. Update user emailVerified to true (userService.updateUser)

    Throws

    403 NBError Forbidden

    • invalid token when verify email
    • email verify token is invalid

Generated using TypeDoc