codeforboston / codeforboston/maple

Final work for phone verification deployment

Open
#2,140 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
56
Forks
175
Avg merge
2d 5h
Merged PRs (30d)
13

Description

**Summary**
Most of the work is done for the Phone Number Verification workflow. Before we deploy to prod we need to do a few final tasks.

## Success Criteria
- [ ] 1. Change verification check before being directed to submit testimony from just email to email and phone in the following places (will have to check phoneVerified from user’s Firestore profile document):
* [Code behind the bill and ballot question pages CTA](https://github.com/codeforboston/maple/blob/main/components/publish/hooks/usePanelStatus.ts#L29-L30)
* [Code behind testimony detail page CTA](https://github.com/codeforboston/maple/blob/main/components/testimony/TestimonyDetailPage/PolicyActions.tsx#L135)

Confirm that on Bill, Ballot Question and Testimony Detail pages, the CTA to submit testimony directs users who have not verified BOTH email and phone to their Profile Page. Examples: [here](https://maple-dev.vercel.app/ballotQuestions/25-08), [here](https://maple-dev.vercel.app/bills/194/H5008), and [here](https://maple-dev.vercel.app/testimony/norht--9nrCzL34sDQa5J/1).

- [ ] 2. Change the user facing language FROM Verify Your Email TO Verify Your Account [here](https://github.com/codeforboston/maple/blob/main/public/locales/en/testimony.json#L38-L40):
That will update the language on the bill, ballot question, and testimony CTAs
[here](https://maple-dev.vercel.app/ballotQuestions/25-08), [here](https://maple-dev.vercel.app/bills/194/H5008), and [here](https://maple-dev.vercel.app/testimony/norht--9nrCzL34sDQa5J/1)

- [ ] 3. Change verification check from just email to email and phone for redirect away from submit testimony page (will have to check phoneVerified from user’s Firestore profile document). Change code [here](https://github.com/codeforboston/maple/blob/main/pages/submit-testimony.tsx#L27-L30).

Confirm that a user who has not verified both email and phone is automatically redirected to Profile Page from Submit Testimony Page. Example [here](https://maple-dev.vercel.app/submit-testimony?billId=H5010&court=194&step=position)

- [ ] 4. Check [this test](https://github.com/codeforboston/maple/blob/main/tests/unit/billdetail.test.tsx#L219) didn’t break.

- [ ] 5. Remove the phoneVerificationUI feature flag in the following places:
* EditProfilePage.tsx
* ProfilePage.tsx
* ProfilePage.stories.tsx
* featureFlags.ts

- [ ] 6. Get rid of VerifyAccountSectionLegacy.tsx, and the reference to it in Profile.Page.tsx (used when phoneVerificationUI feature flag is off)

- [ ] 7. Make announcement banner
* Clarify which pages we want to put the banner on (Only on home page or across all pages?
* Clarify how long to leave banner up?
Can use AnnouncementBanner component
See [figma here ](https://www.figma.com/design/DsC9Nzanyb5bXsQfZ3veO9/2024-Base-File?node-id=5369-32940&t=hvA0rvxnwKjSn1zJ-0 )for wording (will need to link to edit profile if logged in, or sign up modal if not)

- [ ] 8. Add this to our deploy checklist for PROD when we're ready to go live:
“Add IAM permissions so "allUsers" has Role "Cloud Functions Invoker" for completePhoneVerification”`

- [ ] 9. Add the following description of how to test phone verification workflow as a note on the Github Wiki / README.
Phone number verification workflow test steps:
* Create new user account
* Navigate to edit profile page . On Phone Number side of verify account section, click "Verify".
* Go through the steps in the "Verify Phone" pop-up modal. Use phone number: 650-555-1234 and code: 123456. (Or can add new testing phone number in Firebase Console > Authentication > Sign-In Method > Phone ? Phone numbers for testing). Confirm that the Phone number side now says "Successfully verified. Thank you!"
* Go to Firebase console > Authentication > Users
Find the user you created. Confirm the phone icon is showing under "providers"
* Go to Firebase console > Firestore > Profiles.
Filer by fullName and find your user.
Confirm it has field phoneVerified: true

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.