Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sockets - Kirsten #20

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Sockets - Kirsten #20

wants to merge 8 commits into from

Conversation

kanderson38
Copy link

MediaRanker Revisited

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
What did you need to configure and setup to make OAuth installed and work? I needed to install the gem; then I registered my app in GitHub and got a client id and client secret in order to access GitHub with the app.
What areas of Rails app code did you need to create/write/modify in order to change logging in to use OAuth? I added routes for GitHub access and callbacks in routes.rb and wrote code in the users controller and user model to process the auth_hash returned by GitHub and use it to either create a new user or find an existing user in the database (and log that user in). I also updated my tests to use OAuth mocks and check that login functionality was workin correctly.
What was one controller test you updated? Why did you need to update it? I updated the test for show in the works_controller_test to verify that a user must be logged in to view the show page (and to verify that the user will be redirected to the root path if she is not logged in)
Why did we need to mock OAuth for testing? Because it's impractical to need to actually log in with GitHub for every single test, and if GitHub is down, our tests won't pass even if the code is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant