Skip to content

Quick-setup helpers and env validation #70

Open

Description

@Shreyavemana

Depends on: Issue #69 (optional)

Summary

Give new users a one-call setup for JWT, API key and OAuth, and a check that lists every missing environment variable.

Reference

  • ts:auth/quick-setup.ts: setupJWTAuth,
  • setupAPIKeyAuth,
  • setupOAuthAuth,
  • generateTestCredentials,
  • printAuthSetupInstructions,
  • validateAuthEnv.

Prior work

Closed PR #4 has nitrostack/auth/setup.py (54 lines). It imports nitrostack/auth/middleware.py from the same branch, so bring that file across or rewrite the import against current modules.

Scope

  • setup_jwt_auth, setup_api_key_auth and setup_oauth_auth, each returning a configuration that the matching module accepts.
  • generate_test_credentials(), documented as test-only.
  • validate_auth_env(kind) -> (valid, missing) and print_auth_setup_instructions(kind).

Acceptance criteria

  • Each helper's output configures its module, covered by a test.
  • validate_auth_env lists every missing variable, not just the first.
  • Test credentials are random on every call and are never printed by default.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions