delight.fm: day 6

Signing in

Ryan Strickler
Jan 27, 2017 · 1 min read

Yesterday I connected the application to Spotify and it returned some basic data. Today I worked on letting the visitor know that they’re signed in and showing them something different.

After thinking about it a little, Devise seemed like overkill for what I need. I decided just to go super simple for now. Once the callback returns from Spotify with the user data, I’m storing the email address and then “signing the user in” by putting the user id into a session variable.

On the home page, I’m checking to see if that variable exists and matches an existing user. If not, they get the original home page. If it’s there, then they see their account information, which isn’t anything besides their email address at this point. Baby steps.

Image for post
Image for post
My super exciting home page.

Next I’m going to add a log out link and then I’m going to start working on the job to import some user data so that there’s something more interesting to look at. 🎉

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