charlottebrf / DoctorsWhoCode

My Time Manager: Your helpful time manager app created for CF: G Ruby course AW 2016 course competition project.
https://evening-lowlands-39707.herokuapp.com/
0 stars 0 forks source link

Best practice placement of Twitter Consumer/Key stuff #53

Open melikecode opened 7 years ago

melikecode commented 7 years ago

See this article

http://recipes.sinatrarb.com/p/middleware/twitter_authentication_with_omniauth

"Note that we used the CONSUMER_KEY and CONSUMER_SECRET environment variables. This is because it's bad to store this information on your code, so each time you run your app do it like... CONSUMER_KEY= CONSUMER_SECRET= ruby app.rb

This means the Heroku proc file may need updating?

web: bundle exec ruby homepage.rb -p $PORT

charlottebrf commented 7 years ago

@ajh146 Would be great to talk through your Twitter authentication. I can do some reading on the proc file updates if this is still relevant.

melikecode commented 7 years ago

This one was more of a placeholder – it's really easy just take the consumer key in secret in the profile and then remove it from the RB file. Feel free to do a reading if you want, it can't hurt!

charlottebrf commented 7 years ago

Followed these instructions & updated line 9 with Consumer Key & Consumer Secret (both can be found in Heroku app):

http://www.tgreenidge.com/blog/twitter-keys-heroku

https://twittercommunity.com/t/how-do-i-find-my-consumer-key-and-secret/646

Haven't yet updated Proc file, unsure about that part but happy to explore!

charlottebrf commented 7 years ago

Having some issues with Heroku... so this isn't yet pushed to Heroku! screen shot 2016-11-17 at 08 43 41

melikecode commented 7 years ago

Do the git add, gir commit, git push to master to make sure git hub is up to date then simply push to heroku. Apparently heroku isn't technically a git repo so you can't run the commit command on it. You can only push to it straight without the other stuff

charlottebrf commented 7 years ago

Thanks @melikecode yes I'm doing the Git push Heroku Master which has worked before but now gives a 'fatal' message. Could be to do with deleting the repo & re-cloning when I had all those conflict issues previously...

melikecode commented 7 years ago

Can you post screenshot of new error