day 6

Signing in

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.

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. 🎉