User Story
As an Engineer, I should be able to seamlessly integrate phone verification into my application with minimal lines of code so that I can focus development efforts elsewhere in my application.
Acceptance Criteria (Gherkin)
GIVEN: A 10-digit phone number is provided
WHEN: The phone number is submitted to the authentication service
THEN: A text message is sent to the phone associated with the provided number with a verification code
GIVEN: A verification code has been delivered to to the phone associated with a provided phone number
WHEN: The verification code is submitted to the authentication service
IF: The submitted code is equal to the verification code delivered
THEN: A credential will be returned
AND: The account will be logged in with an active session
IF: If submitted code does NOT equal the verification code delivered
THEN: An error is thrown AND no log in occurs
GIVEN: A verification code submitted to the authentication service matches the code delivered
AND: The email address for the account stored in the authentication system
WHEN: The phone number gets verified
IF: The phone number is NOT associated with the account
THEN: The phone number will stored
AND: The phone number will be associated with the account in the authentication system
Technical Notes
- The authentication system == Firebase
- Any consolidation / wrapping around this process would be ideal
Design
User Story
As an Engineer, I should be able to seamlessly integrate phone verification into my application with minimal lines of code so that I can focus development efforts elsewhere in my application.
Acceptance Criteria (Gherkin)
GIVEN: A 10-digit phone number is provided
WHEN: The phone number is submitted to the authentication service
THEN: A text message is sent to the phone associated with the provided number with a verification code
GIVEN: A verification code has been delivered to to the phone associated with a provided phone number
WHEN: The verification code is submitted to the authentication service
IF: The submitted code is equal to the verification code delivered
THEN: A credential will be returned
AND: The account will be logged in with an active session
IF: If submitted code does NOT equal the verification code delivered
THEN: An error is thrown AND no log in occurs
GIVEN: A verification code submitted to the authentication service matches the code delivered
AND: The email address for the account stored in the authentication system
WHEN: The phone number gets verified
IF: The phone number is NOT associated with the account
THEN: The phone number will stored
AND: The phone number will be associated with the account in the authentication system
Technical Notes
Design