feat(auth): Add OAuth2 authentication

This commit is contained in:
Björn Benouarets
2026-01-27 16:35:46 +01:00
commit 50c85e9b7f
36 changed files with 1599 additions and 0 deletions

23
secnex/app/utils.py Normal file
View File

@@ -0,0 +1,23 @@
import typer
from typing import Optional
from rich.console import Console
from rich.table import Table
from rich.prompt import Prompt
import os
import json
import secnex.utils as u
console = Console()
utils_app = typer.Typer()
@utils_app.command(name="secret", help="Generate a new secret")
def generate_secret() -> str:
"""Generate a new secret"""
secret = u.generate_secret()
console.print(f"Secret: {secret}")
console.print(f"Hash: {u.hash_secret(secret)}")
return secret