Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Banner Dynamic JSON Badge

RecAuth

A lightweight verification utility for securely confirming user ownership via profile bio validation.

Credit to @pckydev for the API endpoints utilised in this project.


Overview

RecAuth provides a minimal, dependency-light method for verifying account ownership without requiring OAuth, passwords, or sensitive credentials.

Verification Model

  1. Generate a unique verification code.
  2. Instruct the user to place the code in their profile bio.
  3. Confirm ownership by validating the presence of the code.

This ensures the user has control over the account while maintaining a simple integration flow.


Installation

git clone https://github.com/novadevvvv/recauth.git
cd recauth

Usage

Import

from src.Pocky.authenticate import checkCode
from src.Pocky.getCode import getCode
from src.Pocky.verifyAccount import verifyAccount

API Reference


getCode(username: str) -> dict

Generates a unique verification code for a given username.

Example

response = getCode("Coach")
print(response)

Example Response

{
  "ok": true,
  "username": "Coach",
  "code": "Banana",
  "expiry": "2026-02-15T14:32:10Z"
}

verifyAccount(username: str) -> dict

Checks whether the generated verification code exists in the user's bio.
If verification succeeds, a session token is issued.

Example

response = verifyAccount("Coach")
print(response)

Example Response

{
  "ok": true,
  "username": "Coach",
  "sessionToken": "abc123xyz456",
  "expiry": "2026-02-15T15:32:10Z"
}

checkCode(code: str) -> dict

Retrieves the account associated with a verification code.

Example

response = checkCode("Banana")
print(response)

Example Response

{
  "ok": true,
  "username": "Coach",
  "accountId": "1",
  "expiry": "2026-02-15T14:32:10Z"
}

End-to-End Example

username = "Coach"

# Step 1: Generate verification code
code_data = getCode(username)

if not code_data["ok"]:
    raise Exception("Failed to generate code")

code = code_data["code"]

print("Verification code:", code)
print("Ask the user to place this code in their bio.")

# Step 2: After user updates bio, verify ownership
verification = verifyAccount(username)

if verification.get("ok"):
    print("User successfully verified.")
    print("Session Token:", verification["sessionToken"])
else:
    print("Verification failed.")

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages