rubyforgood / rubyforgood/casa
Endpoint /api/v1/users/validate checks if access and refresh token received matches database
Open
Nobody has claimed this yet.
no-issue-activity
- Dominant language
- Ruby
- Stars
- 381
- Forks
- 542
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 47
Description
Part of epic #3942
What type of user does this affect?
- volunteers
How should it operate? ⚙️🛠️
There should now be an api/v1/users/validateroute that receives an access and refresh token, then checks validity.
Acceptance Criteria
- Adds
users/validatepost route toapi/v1/( /api/v1/users/validate ) - Hashes then compares received
access tokenandrefresh tokento value stored in database digests
(access_token_digestandrefresh_token_digest) - Returns boolean,
trueorfalse, based on validity in response
Helpful Links
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the app/controllers/api/v1 folder linked in the issue and trace the existing user API route structure. Add the POST /api/v1/users/validate entry point, then verify that it compares hashed access and refresh tokens with the database digests and returns true or false according to validity.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, authentication, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100