Day 3

Ryan Strickler
Nov 30, 2016 · 1 min read

More work on phone number sign up today. Still figuring out how to store and confirm phone numbers. To give a little more information on the process, here are the fields I‘m working with to sign someone up via a phone number:

phone number: 10 digits
confirmed: true/false
confirmation token: a bunch of random characters like ehjsij274jdh38

This is what you need if you are storing phone numbers in their own table. When you need a phone number for someone, you just look for the one where confirmed = true. You can ignore the other ones.

If you’re storing the phone number alongside other data, say in your user table, you need something like this:

phone number: 10 digits
new phone number: 10 digits
confirmation token: a bunch of random characters like ehjsij274jdh38

You need two phone number fields when someone changes their number. That way you can keep track of the old number while the new number is being confirmed.

I like the first approach because it seems cleaner and allows for more checks to be passed off to the database. You can require the phone number field to always be populated with the first approach, but not the second.

But I’m running into a few issues getting it to work. It might be a dumb idea and a waste of time. Hoping to get it wrapped up either way tomorrow and keep moving on other features.

Little King: Daily Log

Building something every day.

Ryan Strickler

Written by

Building something every day. Launching something new every 6 weeks. Writing about everything along the way.

Little King: Daily Log

Building something every day. Launching something new every 7 weeks. Writing about everything along the way.

Ryan Strickler

Written by

Building something every day. Launching something new every 6 weeks. Writing about everything along the way.

Little King: Daily Log

Building something every day. Launching something new every 7 weeks. Writing about everything along the way.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store