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

Create single user login #7

Closed melikecode closed 7 years ago

melikecode commented 7 years ago

I want to be able to "log in" so that other people can't add to my repository or log activities on my account (i.e. "user" and "secret" combo for simple login)

charlottebrf commented 7 years ago

In the end I tried to follow documentation for Sinatra adding User Authentication from this tutorial. Got a little confused about which .erb file to save to (e.g. homepage.erb or application_controller.erb): https://learn.co/lessons/sinatra-user-auth

Some other documentation I checked out on the topic:

Exploring options using Sinatra & Ruby: https://sklise.com/2013/03/08/sinatra-warden-auth/

There is also this piece of ready created code: http://stackoverflow.com/questions/3559824/what-is-a-very-simple-authentication-scheme-for-sinatra-rack

Sinatra user authentication process: https://learn.co/lessons/sinatra-user-auth

sohbaker commented 7 years ago

I like the first tutorial link you've found from learn.co - thanks for that. We can ask about which erb file tonight.

melikecode commented 7 years ago

I've got this working via Twitter now, so you can sign into the thing with your Twitter id. I'm going to work on updating the logging code so that it includes the user ID of the person so that they only see their log stuff