steedos-auth

Authenticate users in multi-tenant Steedos spaces with JWT, cookies, and API keys.

1.6k|413|Updated Mar 4, 2019
One-click install
npx skills add https://github.com/steedos/steedos-platform --skill steedos-auth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: steedos-auth
Source: https://github.com/steedos/steedos-platform/tree/main/skills/steedos-auth
Command: npx skills add https://github.com/steedos/steedos-platform --skill steedos-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Authenticate users across multi-tenant Steedos spaces using JWT, session cookies, and API keys.

Core Features & Use Cases

  • Multi-format token support: JWT, cookies, and API keys for flexible auth flows.
  • NestJS integration: AuthGuard, AdminGuard, and AuthService with signIn, getUserByToken, extractTokenFromHeaderOrCookie.
  • Tenant-aware: space_users membership checks and per-space context as req.user.

Quick Start

Install the steedos-auth module and call signIn with a username and password to obtain access and auth tokens for a user in a specific space.

Frequently Asked Questions about steedos-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate users in NestJS using JWT and session cookies?

You can authenticate users in NestJS by implementing an AuthService with signIn methods to generate tokens, using AuthGuard to protect routes, and validating JWT or session cookies through extractTokenFromHeaderOrCookie.

How do I validate API keys and JWT tokens for multi-tenant spaces?

Validate API keys and JWT tokens by performing space_users membership checks and resolving per-space context, ensuring the authenticated user is attached to the request context as req.user within the specific Steedos space.

How do I extract authentication tokens from headers or cookies in a NestJS guard?

Extract authentication tokens by calling extractTokenFromHeaderOrCookie within your NestJS guards or controllers to retrieve JWT or session credentials from incoming HTTP requests for user resolution.

Can I use NestJS AuthGuard and AdminGuard for multi-tenant access control?

Yes, NestJS AuthGuard and AdminGuard support multi-tenant access control by validating hashed login tokens and checking space_users membership to enforce authentication and authorization rules per Steedos space.

What is the best way to manage login flows and token validation across multiple tenants?

Manage multi-tenant login flows by calling signIn with credentials to obtain access tokens, then validating those tokens against space_users records to resolve user context and authenticate requests across different spaces.

Why does my NestJS authentication return an invalid user context for a specific space?

Invalid user context occurs when space_users membership checks fail, preventing proper per-space context resolution; ensure the user belongs to the target space and the correct hashed login token is validated.