{"id":16916,"library":"tdn-auth","title":"Angular Django REST Auth Interface","description":"tdn-auth is an Angular module designed to provide an interface for interacting with Django REST Auth backends. As of version 5.0.9, the package primarily targets Angular 5.x. It offers functionalities for authentication flows, including configuration overrides for base URLs and other parameters. The package has not seen updates since its last publish approximately 7 years ago, making it effectively abandoned. It is not compatible with modern Angular versions (Angular 6+) and is best suited for legacy Angular 5 applications. There is no active release cadence or ongoing development. Its key differentiator was providing a pre-built integration layer for a specific Django authentication framework at the time of its release.","status":"abandoned","version":"5.0.9","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","angular","angular2","angular 2","django-rest-auth","typescript"],"install":[{"cmd":"npm install tdn-auth","lang":"bash","label":"npm"},{"cmd":"yarn add tdn-auth","lang":"bash","label":"yarn"},{"cmd":"pnpm add tdn-auth","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required for Angular application animations, part of the core Angular framework dependencies.","package":"@angular/animations","optional":false},{"reason":"Angular Component Dev Kit, provides foundational utilities for building Angular components, including accessibility and interaction patterns.","package":"@angular/cdk","optional":false},{"reason":"Core Angular common modules, providing common directives, pipes, and services.","package":"@angular/common","optional":false},{"reason":"Required for compiling Angular templates and components.","package":"@angular/compiler","optional":false},{"reason":"The core Angular framework, essential for any Angular application.","package":"@angular/core","optional":false},{"reason":"An Angular library for building responsive layouts using Flexbox, commonly used with Angular Material.","package":"@angular/flex-layout","optional":false},{"reason":"Provides support for building forms in Angular applications.","package":"@angular/forms","optional":false},{"reason":"Angular Material component library, used for UI elements.","package":"@angular/material","optional":false},{"reason":"Required for Angular applications running in a browser environment.","package":"@angular/platform-browser","optional":false},{"reason":"Essential for navigation and routing within Angular applications.","package":"@angular/router","optional":false},{"reason":"JavaScript polyfills required for older browsers or specific JavaScript features not natively supported.","package":"core-js","optional":false},{"reason":"Utility for handling cookies in Angular applications, likely used for session management or token storage.","package":"ngx-cookie","optional":false},{"reason":"Reactive Extensions for JavaScript, used extensively in Angular for asynchronous programming and event handling.","package":"rxjs","optional":false},{"reason":"A patching mechanism for asynchronous operations, critical for Angular's change detection mechanism.","package":"zone.js","optional":false},{"reason":"Polyfill for the Reflect Metadata API, used by TypeScript decorators in Angular.","package":"reflect-metadata","optional":false}],"imports":[{"note":"The README contains a discrepancy; assume 'tdn-auth' is the correct package name. Always use `AuthModule.forRoot()` to initialize.","wrong":"import { AuthModule } from 'angular-auth/auth.module';","symbol":"AuthModule","correct":"import { AuthModule } from 'tdn-auth';"},{"note":"This is a deep import for configuration customization. Do not try to import directly from 'tdn-auth'.","wrong":"import { AuthConfig } from 'tdn-auth';","symbol":"AuthConfig","correct":"import { AuthConfig } from 'tdn-auth/auth.config';"},{"note":"Custom configuration requires extending `AuthConfig` and applying the `@Injectable()` decorator. This is a class, not a direct export.","wrong":"const CustomAuthConfig = require('tdn-auth/auth.config').AuthConfig; // Incorrect for Angular/TypeScript","symbol":"CustomAuthConfig","correct":"import { Injectable } from '@angular/core';\nimport { AuthConfig } from 'tdn-auth/auth.config';\n\n@Injectable()\nexport class CustomAuthConfig extends AuthConfig {\n    constructor() {\n        super();\n        // Customize properties like base_url\n        this.base_url = 'https://your.api.com/auth/';\n    }\n}"}],"quickstart":{"code":"import { NgModule } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { AuthModule } from 'tdn-auth';\nimport { Injectable } from '@angular/core';\nimport { AuthConfig } from 'tdn-auth/auth.config';\n\n// Assuming you have an Angular environment file for configuration\nconst environment = {\n  production: false,\n  api_base_url: 'https://your-django-rest-auth-api.com/' // Replace with your Django REST Auth API base URL\n};\n\n@Injectable()\nexport class CustomAuthConfig extends AuthConfig {\n    constructor() {\n        super();\n        this.base_url = environment.api_base_url;\n        // Further customization, e.g., token names, endpoints\n        // this.login_url = 'auth/jwt/create/';\n        // this.token_name = 'access_token';\n    }\n}\n\n@NgModule({\n  imports: [\n    BrowserModule,\n    // ... other Angular modules like HttpClientModule for API calls\n    AuthModule.forRoot(CustomAuthConfig) // Use AuthModule with your custom configuration\n  ],\n  providers: [],\n  bootstrap: []\n})\nexport class AppModule { }\n","lang":"typescript","description":"This quickstart demonstrates how to import and initialize the `AuthModule` in an Angular application, including how to provide a custom configuration by extending `AuthConfig` to set the base URL for the Django REST Auth API."},"warnings":[{"fix":"For new projects or existing projects on Angular 6+, consider migrating to a actively maintained Angular authentication library or a custom solution. If locked into Angular 5.x, ensure all peer dependencies exactly match the versions specified.","message":"This package is effectively abandoned and built for Angular 5.x. It will not work with Angular 6+ due to breaking changes in the Angular framework, particularly in RxJS and the Angular CLI's build process, without significant manual intervention and polyfills.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Always use `import { AuthModule } from 'tdn-auth';` and `import { AuthConfig } from 'tdn-auth/auth.config';`. Test thoroughly if an alternative path is attempted.","message":"The README contains a conflicting import path for `AuthModule` (`angular-auth/auth.module`) versus `AuthConfig` (`tdn-auth/auth.config`). Based on the package name `tdn-auth`, the correct import for `AuthModule` is likely directly from 'tdn-auth'.","severity":"gotcha","affected_versions":">=5.0.0"},{"fix":"Audit all transitive dependencies for known CVEs. Strongly consider implementing a modern, actively maintained authentication solution. Do not use this package for new deployments.","message":"The package has not been updated in approximately 7 years, meaning it likely contains security vulnerabilities due to unpatched dependencies or outdated authentication practices. Using it in production is highly risky.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Ensure `AuthModule.forRoot()` is called within your `imports` array in the root `AppModule`, passing `CustomAuthConfig` if needed.","message":"Initialization of `AuthModule` requires `AuthModule.forRoot()` to provide configuration. Simply importing `AuthModule` without calling `forRoot()` will result in missing providers and runtime errors.","severity":"gotcha","affected_versions":">=5.0.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"fix":"Ensure `AuthModule.forRoot()` is included in the `imports` array of your root Angular module (e.g., `AppModule`).","cause":"The AuthModule was not properly imported or initialized, specifically `forRoot()` was not called.","error":"Error: Uncaught (in promise): Error: StaticInjectorError[AuthService]: StaticInjectorError[AuthService]: NullInjectorError: No provider for AuthService!"},{"fix":"Ensure `@angular/common/http` is imported as `HttpClientModule` in your `AppModule` and listed in its `imports` array, alongside `BrowserModule`.","cause":"This package was developed for Angular 5.x, which uses `HttpClientModule` (from `@angular/common/http`) for HTTP requests. Later Angular versions might have subtle changes or require different setup, or you might be missing this specific import.","error":"Module not found: Error: Can't resolve '@angular/common/http'"},{"fix":"This package is not compatible with modern Angular versions (6+) or their corresponding TypeScript versions. Revert to Angular 5.x and a compatible TypeScript version (e.g., TypeScript 2.5-2.7) or migrate to a different authentication library.","cause":"Incompatibility with newer TypeScript versions or mismatched Angular peer dependencies.","error":"ERROR in node_modules/tdn-auth/tdn-auth.d.ts(XX,XX): error TS2307: Cannot find module '@angular/core' or its corresponding type declarations."}],"ecosystem":"npm","meta_description":null}