Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement phone verification service #188

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c06cbe2
Create service to handle phone verification
BambanzaJuniorThe2nd Dec 8, 2020
076c5d8
Rename methods sendSms and confirmSms in module VerificationService t…
BambanzaJuniorThe2nd Dec 14, 2020
4b126d2
Rename method confirmVerficationSms to confirmVerificationCode
BambanzaJuniorThe2nd Dec 14, 2020
62a9341
Create error message for when there's no record corresponding to a sp…
BambanzaJuniorThe2nd Dec 14, 2020
e31f4d3
Implement user service method for verifying donor by setting isPhoneV…
BambanzaJuniorThe2nd Dec 14, 2020
9d03e4c
Implement user service method for verifying donor by setting isPhoneV…
BambanzaJuniorThe2nd Dec 14, 2020
83c3ae6
Update sms format for phone verification
BambanzaJuniorThe2nd Dec 14, 2020
ec896a3
Commit master branch changes
BambanzaJuniorThe2nd Dec 15, 2020
94e579b
Commit master branch changes
BambanzaJuniorThe2nd Dec 15, 2020
2605035
Create event emitters and listeners for when a user is created or act…
BambanzaJuniorThe2nd Dec 15, 2020
319f286
implement error handling cases for error codes phoneAlreadyVerfied an…
BambanzaJuniorThe2nd Dec 15, 2020
4cb51bf
Resolve error 'Property getAllBeneficiaries does not exist'
BambanzaJuniorThe2nd Dec 15, 2020
6fc8075
Return corresponding verification record after verifying phone number
BambanzaJuniorThe2nd Dec 16, 2020
e8d9113
Design and implement phone verification page
BambanzaJuniorThe2nd Dec 16, 2020
9733a65
Create a route entry for the verify-phone page
BambanzaJuniorThe2nd Dec 17, 2020
c3383ff
Display phone verification-related error message on page in addition …
BambanzaJuniorThe2nd Dec 17, 2020
d3ebd1f
Redirect user to home page upon clicking Return home button
BambanzaJuniorThe2nd Dec 17, 2020
b532cfc
Use await when invoking bitly link shortener method shortenLink
BambanzaJuniorThe2nd Jan 4, 2021
27cb7cc
Update verified user projection label from VERIFIED_DONOR_PROJECTION …
BambanzaJuniorThe2nd Jan 4, 2021
8fb2b7c
Display appropriate error message on verify-phone page
BambanzaJuniorThe2nd Jan 5, 2021
679acd2
Exclude code when fetching phone verification records
BambanzaJuniorThe2nd Jan 6, 2021
b717950
Create endpoint for fetching specific phone verification record
BambanzaJuniorThe2nd Jan 6, 2021
e21c04c
Update utility method generateId to take in a size parameter
BambanzaJuniorThe2nd Jan 6, 2021
0624abe
Redefine method confirmVerificationCode to take in and id and code
BambanzaJuniorThe2nd Jan 6, 2021
32322ae
Redefine method confirmVerifcationCode to be more error-specific
BambanzaJuniorThe2nd Jan 7, 2021
0e5f2f2
Redefine endpoint for confirming verification code to be of HTTP PUT …
BambanzaJuniorThe2nd Jan 7, 2021
5a9087c
Create a frontend verifications service method to fetch speciclear
BambanzaJuniorThe2nd Jan 7, 2021
32d9d33
Implement logic for submitting phone verification code
BambanzaJuniorThe2nd Jan 7, 2021
920b662
Only pass the phone verification code in the request body when hittin…
BambanzaJuniorThe2nd Jan 8, 2021
a105384
Throw phone already verified error in method getById from service Pho…
BambanzaJuniorThe2nd Jan 8, 2021
9417726
Use base_url in link in getPhoneVerificationLink
BambanzaJuniorThe2nd Jan 8, 2021
c2f10b8
Remove access to state field message from verify-phone view
BambanzaJuniorThe2nd Jan 8, 2021
80af806
Implement new verifications service method for creating phone verific…
BambanzaJuniorThe2nd Jan 11, 2021
62e1be6
Create another a db-specific type that includes field code in phone v…
BambanzaJuniorThe2nd Jan 11, 2021
6e7b917
Implement validators and validation schemas for service phone-verific…
BambanzaJuniorThe2nd Jan 11, 2021
ba3e543
Pass user object in body when creating phone verification record
BambanzaJuniorThe2nd Jan 11, 2021
5ca422c
Pass user phone in body when creating phone verification records
BambanzaJuniorThe2nd Jan 11, 2021
6bac957
Remove event emitter emitUserCreated in User service method create
BambanzaJuniorThe2nd Jan 11, 2021
24de1fc
Remove event emitter emitUserCreated in User service method create
BambanzaJuniorThe2nd Jan 11, 2021
45eda17
Redirect user to verify their phone number after signing up
BambanzaJuniorThe2nd Jan 11, 2021
6efa0e2
Remove event emitter emitUserActivated in User service method activat…
BambanzaJuniorThe2nd Jan 11, 2021
6f6ac31
Pass phone to User-service method create upon hitting endpoint for cr…
BambanzaJuniorThe2nd Jan 11, 2021
1840802
Hide sign-up dialog upon redirection to verify-phone page
BambanzaJuniorThe2nd Jan 11, 2021
cf7213c
Fetch phone verification record only if not available in state
BambanzaJuniorThe2nd Jan 11, 2021
c74011e
Reformat phone verification sms to be shorter
BambanzaJuniorThe2nd Jan 11, 2021
380eb14
Fetch phone verification record only if not available in state
BambanzaJuniorThe2nd Jan 11, 2021
3ce4efa
Implement Phone Verification service method to resend new verificatio…
BambanzaJuniorThe2nd Jan 12, 2021
ef351ae
Create endpoint for requesting resend of phone verification code
BambanzaJuniorThe2nd Jan 12, 2021
a6bce31
Implement action for resending phone verification code
BambanzaJuniorThe2nd Jan 12, 2021
242d6b4
Update confirmVerificationCodeInputSchema to allow code as input
BambanzaJuniorThe2nd Jan 12, 2021
3472666
Throw Invalid phone verification code error if supplied code does not…
BambanzaJuniorThe2nd Jan 13, 2021
012c1cb
Create an invalidPhoneVerificationCode error code
BambanzaJuniorThe2nd Jan 13, 2021
9d6a2d8
Update link in getPhoneVerificationLink
BambanzaJuniorThe2nd Jan 13, 2021
728e902
Commit implementation of Verifications service method resendPhoneVeri…
BambanzaJuniorThe2nd Jan 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Only pass the phone verification code in the request body when hittin…
…g the phone verification endpoint
  • Loading branch information
BambanzaJuniorThe2nd committed Jan 8, 2021
commit 920b6623626e8a06f1d766b9e7febcfd8c4de014
4 changes: 2 additions & 2 deletions server/src/rest/routes/verifications.ts
Original file line number Diff line number Diff line change
@@ -3,8 +3,8 @@ import { wrapResponse } from '../middleware';

export const verifications = Router();

verifications.put('/phone/', wrapResponse(
req => req.core.phoneVerification.confirmVerificationCode(req.body.id, req.body.code)));
verifications.put('/phone/:id', wrapResponse(
req => req.core.phoneVerification.confirmVerificationCode(req.params.id, req.body.code)));

verifications.get('/phone/:id', wrapResponse(
req => req.core.phoneVerification.getById(req.params.id)));