Day 12

Signing out

Ryan Strickler
Dec 9, 2016 · 1 min read

Worked on the sign-out portion of Prompt today. Signing out is set up at the device level. Each device (browser) has a record in the devices table. Each row has a flag that indicates whether it is signed in or not. When the user clicks sign out, I look up the device based on it’s cookie, and flip the switch to off, then send the user back to the home page. Simple. Pages that need to be authenticated can check this field to verify that the device is allowed to access the page.

Eventually, a person might be able to see a list of all their devices that are signed in, and sign them out one at a time or all at once. Similar to something you might see with a service like Dropbox. No need to do that now though. Keep it simple.

The long-term plan is create a bunch of small services, so I’m trying to build things in a way that the code will be re-usable. To me, that means keeping my objects/database tables small and separating them at conceptual boundaries. If I can design things in a logical way, then I’m hoping that I can re-use code across multiple sites and the process of creating this foundational functionality will get more and more efficient. Hopefully I’m not just over-thinking/over-engineering things.

I’ll work on sign-in tomorrow and then it’ll be back to the core functionality of the app: sending notifications. 🎉

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