Skip to Content
Engineering11 SDKs doc 🔥
SdksAuth SDK

Auth SDK

The Engineering11 Auth SDK is a fully functional microservice SDK designed for seamless integration within the Engineering11 ecosystem. It provides a comprehensive authentication layer, handling user authentication, token management, event publishing, and claims management.

This SDK is built to support multi-tenant applications with customizable authentication workflows.

Key Features

  • Secure token handling through AuthRestClient
  • Methods for fetching default product IDs and updating custom claims

Comparison with Alternatives

ProductComparison
Auth0Provides a comprehensive identity management solution, but the Engineering11 SDK offers a more tightly integrated experience within the Engineering11 ecosystem.
Firebase AuthenticationWhile Firebase Authentication includes robust user management, this SDK enhances custom claims management and multi-tenant event handling.

Detailed Functionality

Fetch Default Product IDs

  • fetchDefaultProductIds() in AuthRestClient
  • Retrieves default product IDs based on user type

Update Custom Claims

  • updateCustomClaims() in AuthJobsClient
  • Supports bulk updates to user claims, reducing API call overhead

Email Verification

  • EmailVerificationService
  • Sends secure verification emails to users

Event Publishing

  • EventService
  • Publishes user-related events for a reactive microservices architecture

API Endpoints

MethodEndpointDescription
GET/ENDPOINTS.INTERNAL.FETCH_DEFAULT_PRODUCTSFetch Default Product IDs
PUT/password-resetReset password with a custom link
PUT/verify-emailVerify user email
POST/ENDPOINTS.INTERNAL.UPDATE_CUSTOM_CLAIMSBulk update custom claims

Core Technologies

  • Node.js
  • Firebase Admin SDK
  • NestJS
  • TypeScript
  • Jest (for testing)
  • Lodash (for utility functions)

Usage Example

import { AuthRestClient } from "@engineering11/auth-rest"; const authClient = new AuthRestClient(); async function fetchProducts(userId) { const productIds = await authClient.fetchDefaultProductIds(userId); console.log("Default Products:", productIds); }

The Engineering11 Auth SDK enables rapid development of scalable authentication services while ensuring security and maintainability.

Last updated on