Crowdhound connects dog owners with local people that would love the opportunity to chill with a dog for an afternoon or a few days, without having the responsibility 24/7/365.
Changes proposed in this pull request:
This PR adds a mutation that allows current users to log out. When a valid googleToken is passed in, the User is found, and their google_token in the database is set to nil. An invalid googleToken will trigger an error message.
Refactors authenticatedUser spec
Adds logOutMutation with spec
Adds logOutMutation to GraphQL schema
Adds documentation for logOutUser mutation
UPDATE: refactors logOutUser mutation to leverage BaseMutation::boot_unauthenticated_user
Resolves #62
The following checks have been completed:
[x] Tested my new feature(s) as well as any feasible edge cases (if possible)
[x] Checked coverage/index.html - did not add any new code that's not covered by testing (if possible)
[x] Merged in the latest master to my branch with git pull origin master & resolved merge conflicts
[x] Ran rails db:migrate
[x] Ran the test suite - all tests are passing (or maybe skipped)
[x] Checked affected endpoints in Postman / GraphiQL
[x] Updated README for changes (new endpoints, new gems, etc)
Changes proposed in this pull request: This PR adds a mutation that allows current users to log out. When a valid googleToken is passed in, the User is found, and their google_token in the database is set to nil. An invalid googleToken will trigger an error message.
Resolves #62
The following checks have been completed:
coverage/index.html
- did not add any new code that's not covered by testing (if possible)git pull origin master
& resolved merge conflictsrails db:migrate