rubyforgood / rubyforgood/casa

Endpoint /api/v1/users/validate checks if access and refresh token received matches database

Open
#6,256 3 comments 0 reactions 0 assignees View on GitHub

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/validate post route to api/v1/ ( /api/v1/users/validate )
  • Hashes then compares received access token and refresh token to value stored in database digests
    ( access_token_digestand refresh_token_digest )
  • Returns boolean, true or false, based on validity in response
Helpful Links

API Folder Structure

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.