If you have questions, I will be happy to expand these notes.
Note that you need to add the httparty
gem to your Gemfile for this code to work!
You may also want to get RSpotify
to handle this for you! Instructions for trying that
are in their README here.
I haven't used it before but am more than happy to help debug issues!
Supporting OAuth requires storing Access Tokens, Refresh Tokens, and Expiration Times on the User model.
I have not included migrations for that in this code. You can see I assume column names of access_token
,
refresh_token
, and expires_at
but feel free to change those names. As you can see, I have added changes
to the Users and Songs controllers and User model to support OAuth.
Forthcoming