Implement Refresh Token Validation Function #62

Closed
opened 2026-03-12 00:14:46 +00:00 by charlie · 0 comments
Owner

Description

We need a function to validate a refresh token

Requirements

  1. Function name: check_refresh
  2. Input parameters:
    • userid (integer) the ID of the user asking to verify his token
    • token (varchar(255)) the refresh token to verify
  3. Return:
    • Boolean

Proposed logic

  1. Check if the token exist, haven't expired have not been rotated, for that user in the token table.
  2. If the token exist mark it as rotated
  3. return true is the token exist and false if it does not.
## Description We need a function to validate a refresh token ## Requirements 1. Function name: `check_refresh` 2. Input parameters: - `userid` (integer) the ID of the user asking to verify his token - `token` (varchar(255)) the refresh token to verify 3. Return: - Boolean ## Proposed logic 1. Check if the token exist, haven't expired have not been rotated, for that user in the token table. 2. If the token exist mark it as rotated 3. return true is the token exist and false if it does not.
yara referenced this issue from a commit 2026-03-17 17:06:43 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ULFSII/phoenix_db#62
No description provided.