@mintplayer/ng-spark-auth 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mintplayer-ng-spark-auth.mjs","sources":["../../src/lib/models/auth-config.ts","../../src/lib/models/auth-route-config.ts","../../src/lib/services/spark-auth.service.ts","../../src/lib/interceptors/spark-auth.interceptor.ts","../../src/lib/guards/spark-auth.guard.ts","../../src/lib/providers/provide-spark-auth.ts","../../src/lib/routes/spark-auth-routes.ts","../../src/lib/components/auth-bar/spark-auth-bar.component.ts","../../src/lib/components/login/spark-login.component.ts","../../src/lib/components/two-factor/spark-two-factor.component.ts","../../src/lib/components/register/spark-register.component.ts","../../src/lib/components/forgot-password/spark-forgot-password.component.ts","../../src/lib/components/reset-password/spark-reset-password.component.ts","../../src/mintplayer-ng-spark-auth.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport interface SparkAuthConfig {\n apiBasePath: string;\n defaultRedirectUrl: string;\n loginUrl: string;\n}\n\nexport const SPARK_AUTH_CONFIG = new InjectionToken<SparkAuthConfig>('SPARK_AUTH_CONFIG');\n\nexport const defaultSparkAuthConfig: SparkAuthConfig = {\n apiBasePath: '/spark/auth',\n defaultRedirectUrl: '/',\n loginUrl: '/login',\n};\n","import { InjectionToken, Type } from '@angular/core';\n\nexport type SparkAuthRouteEntry = string | { path: string; component?: Type<unknown> };\n\nexport interface SparkAuthRouteConfig {\n login?: SparkAuthRouteEntry;\n twoFactor?: SparkAuthRouteEntry;\n register?: SparkAuthRouteEntry;\n forgotPassword?: SparkAuthRouteEntry;\n resetPassword?: SparkAuthRouteEntry;\n}\n\nexport type SparkAuthRoutePaths = Required<Record<keyof SparkAuthRouteConfig, string>>;\n\nexport const SPARK_AUTH_ROUTE_PATHS = new InjectionToken<SparkAuthRoutePaths>('SPARK_AUTH_ROUTE_PATHS');\n","import { computed, inject, Injectable, signal } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable, switchMap, tap } from 'rxjs';\nimport { AuthUser, SPARK_AUTH_CONFIG } from '../models';\n\n@Injectable({ providedIn: 'root' })\nexport class SparkAuthService {\n private readonly http = inject(HttpClient);\n private readonly config = inject(SPARK_AUTH_CONFIG);\n\n private readonly currentUser = signal<AuthUser | null>(null);\n\n readonly user = this.currentUser.asReadonly();\n readonly isAuthenticated = computed(() => this.currentUser()?.isAuthenticated === true);\n\n constructor() {\n this.checkAuth().subscribe();\n }\n\n login(email: string, password: string): Observable<void> {\n return this.http\n .post<void>(`${this.config.apiBasePath}/login?useCookies=true`, { email, password })\n .pipe(\n switchMap(() => this.csrfRefresh()),\n tap(() => { this.checkAuth().subscribe(); }),\n );\n }\n\n loginTwoFactor(twoFactorCode: string, twoFactorRecoveryCode?: string): Observable<void> {\n return this.http\n .post<void>(`${this.config.apiBasePath}/login?useCookies=true`, {\n twoFactorCode,\n twoFactorRecoveryCode,\n })\n .pipe(\n switchMap(() => this.csrfRefresh()),\n tap(() => { this.checkAuth().subscribe(); }),\n );\n }\n\n register(email: string, password: string): Observable<void> {\n return this.http.post<void>(`${this.config.apiBasePath}/register`, { email, password });\n }\n\n logout(): Observable<void> {\n return this.http\n .post<void>(`${this.config.apiBasePath}/logout`, {})\n .pipe(\n switchMap(() => this.csrfRefresh()),\n tap(() => { this.currentUser.set(null); }),\n );\n }\n\n csrfRefresh(): Observable<void> {\n return this.http.post<void>(`${this.config.apiBasePath}/csrf-refresh`, {});\n }\n\n checkAuth(): Observable<AuthUser | null> {\n return this.http.get<AuthUser>(`${this.config.apiBasePath}/me`).pipe(\n tap({\n next: (user) => this.currentUser.set(user),\n error: () => this.currentUser.set(null),\n }),\n );\n }\n\n forgotPassword(email: string): Observable<void> {\n return this.http.post<void>(`${this.config.apiBasePath}/forgotPassword`, { email });\n }\n\n resetPassword(email: string, resetCode: string, newPassword: string): Observable<void> {\n return this.http.post<void>(`${this.config.apiBasePath}/resetPassword`, {\n email,\n resetCode,\n newPassword,\n });\n }\n}\n","import { inject } from '@angular/core';\nimport { HttpInterceptorFn } from '@angular/common/http';\nimport { Router } from '@angular/router';\nimport { tap } from 'rxjs';\nimport { SPARK_AUTH_CONFIG } from '../models';\n\nexport const sparkAuthInterceptor: HttpInterceptorFn = (req, next) => {\n const config = inject(SPARK_AUTH_CONFIG);\n const router = inject(Router);\n\n return next(req).pipe(\n tap({\n error: (error) => {\n if (\n error.status === 401 &&\n !req.url.startsWith(config.apiBasePath)\n ) {\n router.navigate([config.loginUrl], {\n queryParams: { returnUrl: router.url },\n });\n }\n },\n }),\n );\n};\n","import { inject } from '@angular/core';\nimport { CanActivateFn, Router } from '@angular/router';\nimport { SPARK_AUTH_CONFIG } from '../models';\nimport { SparkAuthService } from '../services/spark-auth.service';\n\nexport const sparkAuthGuard: CanActivateFn = (route, state) => {\n const authService = inject(SparkAuthService);\n const router = inject(Router);\n const config = inject(SPARK_AUTH_CONFIG);\n\n if (authService.isAuthenticated()) {\n return true;\n }\n\n return router.createUrlTree([config.loginUrl], {\n queryParams: { returnUrl: state.url },\n });\n};\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { HttpFeature, HttpFeatureKind, withInterceptors, withXsrfConfiguration } from '@angular/common/http';\nimport {\n defaultSparkAuthConfig,\n SPARK_AUTH_CONFIG,\n SparkAuthConfig,\n} from '../models';\nimport { sparkAuthInterceptor } from '../interceptors/spark-auth.interceptor';\n\nexport function provideSparkAuth(\n config?: Partial<SparkAuthConfig>,\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n {\n provide: SPARK_AUTH_CONFIG,\n useValue: { ...defaultSparkAuthConfig, ...config },\n },\n ]);\n}\n\nexport function withSparkAuth(): HttpFeature<HttpFeatureKind>[] {\n return [\n withInterceptors([sparkAuthInterceptor]),\n withXsrfConfiguration({ cookieName: 'XSRF-TOKEN', headerName: 'X-XSRF-TOKEN' }),\n ];\n}\n","import { SPARK_AUTH_ROUTE_PATHS, SparkAuthRouteConfig, SparkAuthRouteEntry, SparkAuthRoutePaths } from '../models';\n\ninterface ResolvedEntry {\n path: string;\n loadComponent: () => Promise<any>;\n}\n\nfunction resolveEntry(\n entry: SparkAuthRouteEntry | undefined,\n defaultPath: string,\n defaultLoader: () => Promise<any>,\n): ResolvedEntry {\n if (entry === undefined || typeof entry === 'string') {\n return {\n path: typeof entry === 'string' ? entry : defaultPath,\n loadComponent: defaultLoader,\n };\n }\n return {\n path: entry.path,\n loadComponent: entry.component\n ? () => Promise.resolve(entry.component!)\n : defaultLoader,\n };\n}\n\nexport function sparkAuthRoutes(config?: SparkAuthRouteConfig): any[] {\n const login = resolveEntry(config?.login, 'login',\n () => import('../components/login/spark-login.component').then(m => m.SparkLoginComponent));\n const twoFactor = resolveEntry(config?.twoFactor, 'login/two-factor',\n () => import('../components/two-factor/spark-two-factor.component').then(m => m.SparkTwoFactorComponent));\n const register = resolveEntry(config?.register, 'register',\n () => import('../components/register/spark-register.component').then(m => m.SparkRegisterComponent));\n const forgotPassword = resolveEntry(config?.forgotPassword, 'forgot-password',\n () => import('../components/forgot-password/spark-forgot-password.component').then(m => m.SparkForgotPasswordComponent));\n const resetPassword = resolveEntry(config?.resetPassword, 'reset-password',\n () => import('../components/reset-password/spark-reset-password.component').then(m => m.SparkResetPasswordComponent));\n\n const paths: SparkAuthRoutePaths = {\n login: '/' + login.path,\n twoFactor: '/' + twoFactor.path,\n register: '/' + register.path,\n forgotPassword: '/' + forgotPassword.path,\n resetPassword: '/' + resetPassword.path,\n };\n\n return [\n {\n path: '',\n providers: [\n { provide: SPARK_AUTH_ROUTE_PATHS, useValue: paths },\n ],\n children: [\n { path: login.path, loadComponent: login.loadComponent },\n { path: twoFactor.path, loadComponent: twoFactor.loadComponent },\n { path: register.path, loadComponent: register.loadComponent },\n { path: forgotPassword.path, loadComponent: forgotPassword.loadComponent },\n { path: resetPassword.path, loadComponent: resetPassword.loadComponent },\n ],\n },\n ];\n}\n","import { Component, inject } from '@angular/core';\nimport { RouterLink, Router } from '@angular/router';\nimport { SparkAuthService } from '../../services/spark-auth.service';\nimport { SPARK_AUTH_CONFIG } from '../../models';\n\n@Component({\n selector: 'spark-auth-bar',\n standalone: true,\n imports: [RouterLink],\n template: `\n @if (authService.isAuthenticated()) {\n <span class=\"me-2\">{{ authService.user()?.userName }}</span>\n <button class=\"btn btn-outline-light btn-sm\" (click)=\"onLogout()\">Logout</button>\n } @else {\n <a class=\"btn btn-outline-light btn-sm\" [routerLink]=\"config.loginUrl\">Login</a>\n }\n `,\n})\nexport class SparkAuthBarComponent {\n readonly authService = inject(SparkAuthService);\n readonly config = inject(SPARK_AUTH_CONFIG);\n private readonly router = inject(Router);\n\n onLogout(): void {\n this.authService.logout().subscribe(() => {\n this.router.navigateByUrl('/');\n });\n }\n}\n\nexport default SparkAuthBarComponent;\n","import { Component, inject, signal } from '@angular/core';\nimport { ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';\nimport { RouterLink, ActivatedRoute, Router } from '@angular/router';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { BsFormModule } from '@mintplayer/ng-bootstrap/form';\nimport { BsToggleButtonModule } from '@mintplayer/ng-bootstrap/toggle-button';\nimport { SparkAuthService } from '../../services/spark-auth.service';\nimport { SPARK_AUTH_CONFIG, SPARK_AUTH_ROUTE_PATHS } from '../../models';\n\n@Component({\n selector: 'spark-login',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule, BsToggleButtonModule],\n template: `\n <div class=\"d-flex justify-content-center\">\n <div class=\"card\" style=\"width: 100%; max-width: 400px;\">\n <div class=\"card-body\">\n <h3 class=\"card-title text-center mb-4\">Login</h3>\n\n @if (errorMessage()) {\n <div class=\"alert alert-danger\" role=\"alert\">{{ errorMessage() }}</div>\n }\n\n <bs-form>\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"mb-3\">\n <label for=\"email\" class=\"form-label\">Email</label>\n <input\n type=\"text\"\n id=\"email\"\n formControlName=\"email\"\n autocomplete=\"username\"\n />\n </div>\n\n <div class=\"mb-3\">\n <label for=\"password\" class=\"form-label\">Password</label>\n <input\n type=\"password\"\n id=\"password\"\n formControlName=\"password\"\n autocomplete=\"current-password\"\n />\n </div>\n\n <div class=\"mb-3\">\n <bs-toggle-button [type]=\"'checkbox'\" formControlName=\"rememberMe\" [name]=\"'rememberMe'\">Remember me</bs-toggle-button>\n </div>\n\n <button\n type=\"submit\"\n class=\"btn btn-primary w-100\"\n [disabled]=\"loading()\"\n >\n @if (loading()) {\n <span class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\n }\n Login\n </button>\n </form>\n </bs-form>\n\n <div class=\"mt-3 text-center\">\n <a [routerLink]=\"routePaths.register\">Create an account</a>\n </div>\n <div class=\"mt-2 text-center\">\n <a [routerLink]=\"routePaths.forgotPassword\">Forgot password?</a>\n </div>\n </div>\n </div>\n </div>\n `,\n})\nexport class SparkLoginComponent {\n private readonly fb = inject(FormBuilder);\n private readonly authService = inject(SparkAuthService);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute);\n private readonly config = inject(SPARK_AUTH_CONFIG);\n readonly routePaths = inject(SPARK_AUTH_ROUTE_PATHS);\n\n readonly loading = signal(false);\n readonly errorMessage = signal('');\n\n readonly form = this.fb.group({\n email: ['', Validators.required],\n password: ['', Validators.required],\n rememberMe: [false],\n });\n\n onSubmit(): void {\n if (this.form.invalid) return;\n\n this.loading.set(true);\n this.errorMessage.set('');\n\n const { email, password } = this.form.value;\n\n this.authService.login(email!, password!).subscribe({\n next: () => {\n this.loading.set(false);\n const returnUrl = this.route.snapshot.queryParamMap.get('returnUrl');\n this.router.navigateByUrl(returnUrl || this.config.defaultRedirectUrl);\n },\n error: (err: HttpErrorResponse) => {\n this.loading.set(false);\n if (err.status === 401 && err.error?.detail === 'RequiresTwoFactor') {\n const returnUrl = this.route.snapshot.queryParamMap.get('returnUrl');\n this.router.navigate([this.routePaths.twoFactor], {\n queryParams: returnUrl ? { returnUrl } : undefined,\n });\n } else {\n this.errorMessage.set('Invalid email or password.');\n }\n },\n });\n }\n}\n\nexport default SparkLoginComponent;\n","import { Component, inject, signal } from '@angular/core';\nimport { ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';\nimport { RouterLink, ActivatedRoute, Router } from '@angular/router';\nimport { BsFormModule } from '@mintplayer/ng-bootstrap/form';\nimport { SparkAuthService } from '../../services/spark-auth.service';\nimport { SPARK_AUTH_CONFIG, SPARK_AUTH_ROUTE_PATHS } from '../../models';\n\n@Component({\n selector: 'spark-two-factor',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule],\n template: `\n <div class=\"d-flex justify-content-center\">\n <div class=\"card\" style=\"width: 100%; max-width: 400px;\">\n <div class=\"card-body\">\n <h3 class=\"card-title text-center mb-4\">Two-Factor Authentication</h3>\n\n @if (errorMessage()) {\n <div class=\"alert alert-danger\" role=\"alert\">{{ errorMessage() }}</div>\n }\n\n <bs-form>\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n @if (!useRecoveryCode()) {\n <div class=\"mb-3\">\n <label for=\"code\" class=\"form-label\">Authentication Code</label>\n <input\n type=\"text\"\n id=\"code\"\n formControlName=\"code\"\n autocomplete=\"one-time-code\"\n maxlength=\"6\"\n placeholder=\"Enter 6-digit code\"\n />\n </div>\n } @else {\n <div class=\"mb-3\">\n <label for=\"recoveryCode\" class=\"form-label\">Recovery Code</label>\n <input\n type=\"text\"\n id=\"recoveryCode\"\n formControlName=\"recoveryCode\"\n autocomplete=\"off\"\n placeholder=\"Enter recovery code\"\n />\n </div>\n }\n\n <button\n type=\"submit\"\n class=\"btn btn-primary w-100\"\n [disabled]=\"loading()\"\n >\n @if (loading()) {\n <span class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\n }\n Verify\n </button>\n </form>\n </bs-form>\n\n <div class=\"mt-3 text-center\">\n <button class=\"btn btn-link\" (click)=\"toggleRecoveryCode()\">\n @if (useRecoveryCode()) {\n Use authentication code instead\n } @else {\n Use a recovery code instead\n }\n </button>\n </div>\n <div class=\"mt-2 text-center\">\n <a [routerLink]=\"routePaths.login\">Back to login</a>\n </div>\n </div>\n </div>\n </div>\n `,\n})\nexport class SparkTwoFactorComponent {\n private readonly fb = inject(FormBuilder);\n private readonly authService = inject(SparkAuthService);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute);\n private readonly config = inject(SPARK_AUTH_CONFIG);\n readonly routePaths = inject(SPARK_AUTH_ROUTE_PATHS);\n\n readonly loading = signal(false);\n readonly errorMessage = signal('');\n readonly useRecoveryCode = signal(false);\n\n readonly form = this.fb.group({\n code: [''],\n recoveryCode: [''],\n });\n\n toggleRecoveryCode(): void {\n this.useRecoveryCode.update(v => !v);\n this.errorMessage.set('');\n }\n\n onSubmit(): void {\n const isRecovery = this.useRecoveryCode();\n const code = isRecovery ? this.form.value.recoveryCode : this.form.value.code;\n\n if (!code?.trim()) {\n this.errorMessage.set(isRecovery ? 'Please enter a recovery code.' : 'Please enter the 6-digit code.');\n return;\n }\n\n this.loading.set(true);\n this.errorMessage.set('');\n\n const twoFactorCode = isRecovery ? undefined : code;\n const twoFactorRecoveryCode = isRecovery ? code : undefined;\n\n this.authService.loginTwoFactor(twoFactorCode ?? '', twoFactorRecoveryCode).subscribe({\n next: () => {\n this.loading.set(false);\n const returnUrl = this.route.snapshot.queryParamMap.get('returnUrl');\n this.router.navigateByUrl(returnUrl || this.config.defaultRedirectUrl);\n },\n error: () => {\n this.loading.set(false);\n this.errorMessage.set('Invalid code. Please try again.');\n },\n });\n }\n}\n\nexport default SparkTwoFactorComponent;\n","import { Component, inject, signal } from '@angular/core';\nimport { ReactiveFormsModule, FormBuilder, Validators, AbstractControl, ValidationErrors } from '@angular/forms';\nimport { RouterLink, Router } from '@angular/router';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { BsFormModule } from '@mintplayer/ng-bootstrap/form';\nimport { SparkAuthService } from '../../services/spark-auth.service';\nimport { SPARK_AUTH_ROUTE_PATHS } from '../../models';\n\nfunction passwordMatchValidator(control: AbstractControl): ValidationErrors | null {\n const password = control.get('password');\n const confirmPassword = control.get('confirmPassword');\n if (password && confirmPassword && password.value !== confirmPassword.value) {\n return { passwordMismatch: true };\n }\n return null;\n}\n\n@Component({\n selector: 'spark-register',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule],\n template: `\n <div class=\"d-flex justify-content-center\">\n <div class=\"card\" style=\"width: 100%; max-width: 400px;\">\n <div class=\"card-body\">\n <h3 class=\"card-title text-center mb-4\">Register</h3>\n\n @if (errorMessage()) {\n <div class=\"alert alert-danger\" role=\"alert\">{{ errorMessage() }}</div>\n }\n\n <bs-form>\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"mb-3\">\n <label for=\"email\" class=\"form-label\">Email</label>\n <input\n type=\"email\"\n id=\"email\"\n formControlName=\"email\"\n autocomplete=\"email\"\n />\n @if (form.get('email')?.touched && form.get('email')?.hasError('email')) {\n <div class=\"text-danger mt-1\">Please enter a valid email address.</div>\n }\n </div>\n\n <div class=\"mb-3\">\n <label for=\"password\" class=\"form-label\">Password</label>\n <input\n type=\"password\"\n id=\"password\"\n formControlName=\"password\"\n autocomplete=\"new-password\"\n />\n </div>\n\n <div class=\"mb-3\">\n <label for=\"confirmPassword\" class=\"form-label\">Confirm Password</label>\n <input\n type=\"password\"\n id=\"confirmPassword\"\n formControlName=\"confirmPassword\"\n autocomplete=\"new-password\"\n />\n @if (form.touched && form.hasError('passwordMismatch')) {\n <div class=\"text-danger mt-1\">Passwords do not match.</div>\n }\n </div>\n\n <button\n type=\"submit\"\n class=\"btn btn-primary w-100\"\n [disabled]=\"loading()\"\n >\n @if (loading()) {\n <span class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\n }\n Register\n </button>\n </form>\n </bs-form>\n\n <div class=\"mt-3 text-center\">\n <span>Already have an account? </span>\n <a [routerLink]=\"routePaths.login\">Login</a>\n </div>\n </div>\n </div>\n </div>\n `,\n})\nexport class SparkRegisterComponent {\n private readonly fb = inject(FormBuilder);\n private readonly authService = inject(SparkAuthService);\n private readonly router = inject(Router);\n readonly routePaths = inject(SPARK_AUTH_ROUTE_PATHS);\n\n readonly loading = signal(false);\n readonly errorMessage = signal('');\n\n readonly form = this.fb.group({\n email: ['', [Validators.required, Validators.email]],\n password: ['', Validators.required],\n confirmPassword: ['', Validators.required],\n }, { validators: passwordMatchValidator });\n\n onSubmit(): void {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n return;\n }\n\n this.loading.set(true);\n this.errorMessage.set('');\n\n const { email, password } = this.form.value;\n\n this.authService.register(email!, password!).subscribe({\n next: () => {\n this.loading.set(false);\n this.router.navigate([this.routePaths.login], {\n queryParams: { registered: 'true' },\n });\n },\n error: (err: HttpErrorResponse) => {\n this.loading.set(false);\n if (err.status === 400 && err.error?.errors) {\n const messages = ([] as string[]).concat(...Object.values(err.error.errors) as string[][]);\n this.errorMessage.set(messages.join(' '));\n } else if (err.error?.detail) {\n this.errorMessage.set(err.error.detail);\n } else {\n this.errorMessage.set('Registration failed. Please try again.');\n }\n },\n });\n }\n}\n\nexport default SparkRegisterComponent;\n","import { Component, inject, signal } from '@angular/core';\nimport { ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';\nimport { RouterLink } from '@angular/router';\nimport { BsFormModule } from '@mintplayer/ng-bootstrap/form';\nimport { SparkAuthService } from '../../services/spark-auth.service';\nimport { SPARK_AUTH_ROUTE_PATHS } from '../../models';\n\n@Component({\n selector: 'spark-forgot-password',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule],\n template: `\n <div class=\"d-flex justify-content-center\">\n <div class=\"card\" style=\"width: 100%; max-width: 400px;\">\n <div class=\"card-body\">\n <h3 class=\"card-title text-center mb-4\">Forgot Password</h3>\n\n @if (successMessage()) {\n <div class=\"alert alert-success\" role=\"alert\">{{ successMessage() }}</div>\n }\n\n @if (errorMessage()) {\n <div class=\"alert alert-danger\" role=\"alert\">{{ errorMessage() }}</div>\n }\n\n @if (!successMessage()) {\n <p class=\"text-muted mb-3\">\n Enter your email address and we will send you a link to reset your password.\n </p>\n\n <bs-form>\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"mb-3\">\n <label for=\"email\" class=\"form-label\">Email</label>\n <input\n type=\"email\"\n id=\"email\"\n formControlName=\"email\"\n autocomplete=\"email\"\n />\n </div>\n\n <button\n type=\"submit\"\n class=\"btn btn-primary w-100\"\n [disabled]=\"loading()\"\n >\n @if (loading()) {\n <span class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\n }\n Send Reset Link\n </button>\n </form>\n </bs-form>\n }\n\n <div class=\"mt-3 text-center\">\n <a [routerLink]=\"routePaths.login\">Back to login</a>\n </div>\n </div>\n </div>\n </div>\n `,\n})\nexport class SparkForgotPasswordComponent {\n private readonly fb = inject(FormBuilder);\n private readonly authService = inject(SparkAuthService);\n readonly routePaths = inject(SPARK_AUTH_ROUTE_PATHS);\n\n readonly loading = signal(false);\n readonly errorMessage = signal('');\n readonly successMessage = signal('');\n\n readonly form = this.fb.group({\n email: ['', [Validators.required, Validators.email]],\n });\n\n onSubmit(): void {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n return;\n }\n\n this.loading.set(true);\n this.errorMessage.set('');\n this.successMessage.set('');\n\n const { email } = this.form.value;\n\n this.authService.forgotPassword(email!).subscribe({\n next: () => {\n this.loading.set(false);\n this.successMessage.set(\n 'If an account with that email exists, we\\'ve sent a password reset link.',\n );\n },\n error: () => {\n this.loading.set(false);\n // Don't reveal whether the email exists\n this.successMessage.set(\n 'If an account with that email exists, we\\'ve sent a password reset link.',\n );\n },\n });\n }\n}\n\nexport default SparkForgotPasswordComponent;\n","import { Component, inject, OnInit, signal } from '@angular/core';\nimport { ReactiveFormsModule, FormBuilder, Validators, AbstractControl, ValidationErrors } from '@angular/forms';\nimport { RouterLink, ActivatedRoute, Router } from '@angular/router';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { BsFormModule } from '@mintplayer/ng-bootstrap/form';\nimport { SparkAuthService } from '../../services/spark-auth.service';\nimport { SPARK_AUTH_ROUTE_PATHS } from '../../models';\n\nfunction passwordMatchValidator(control: AbstractControl): ValidationErrors | null {\n const password = control.get('newPassword');\n const confirmPassword = control.get('confirmPassword');\n if (password && confirmPassword && password.value !== confirmPassword.value) {\n return { passwordMismatch: true };\n }\n return null;\n}\n\n@Component({\n selector: 'spark-reset-password',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule],\n template: `\n <div class=\"d-flex justify-content-center\">\n <div class=\"card\" style=\"width: 100%; max-width: 400px;\">\n <div class=\"card-body\">\n <h3 class=\"card-title text-center mb-4\">Reset Password</h3>\n\n @if (successMessage()) {\n <div class=\"alert alert-success\" role=\"alert\">\n {{ successMessage() }}\n <div class=\"mt-2\">\n <a [routerLink]=\"routePaths.login\">Go to login</a>\n </div>\n </div>\n }\n\n @if (errorMessage()) {\n <div class=\"alert alert-danger\" role=\"alert\">{{ errorMessage() }}</div>\n }\n\n @if (!successMessage()) {\n <bs-form>\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"mb-3\">\n <label for=\"newPassword\" class=\"form-label\">New Password</label>\n <input\n type=\"password\"\n id=\"newPassword\"\n formControlName=\"newPassword\"\n autocomplete=\"new-password\"\n />\n </div>\n\n <div class=\"mb-3\">\n <label for=\"confirmPassword\" class=\"form-label\">Confirm Password</label>\n <input\n type=\"password\"\n id=\"confirmPassword\"\n formControlName=\"confirmPassword\"\n autocomplete=\"new-password\"\n />\n @if (form.touched && form.hasError('passwordMismatch')) {\n <div class=\"text-danger mt-1\">Passwords do not match.</div>\n }\n </div>\n\n <button\n type=\"submit\"\n class=\"btn btn-primary w-100\"\n [disabled]=\"loading()\"\n >\n @if (loading()) {\n <span class=\"spinner-border spinner-border-sm me-1\" role=\"status\"></span>\n }\n Reset Password\n </button>\n </form>\n </bs-form>\n\n <div class=\"mt-3 text-center\">\n <a [routerLink]=\"routePaths.login\">Back to login</a>\n </div>\n }\n </div>\n </div>\n </div>\n `,\n})\nexport class SparkResetPasswordComponent implements OnInit {\n private readonly fb = inject(FormBuilder);\n private readonly authService = inject(SparkAuthService);\n private readonly router = inject(Router);\n private readonly route = inject(ActivatedRoute);\n readonly routePaths = inject(SPARK_AUTH_ROUTE_PATHS);\n\n readonly loading = signal(false);\n readonly errorMessage = signal('');\n readonly successMessage = signal('');\n\n private email = '';\n private code = '';\n\n readonly form = this.fb.group({\n newPassword: ['', Validators.required],\n confirmPassword: ['', Validators.required],\n }, { validators: passwordMatchValidator });\n\n ngOnInit(): void {\n this.email = this.route.snapshot.queryParamMap.get('email') ?? '';\n this.code = this.route.snapshot.queryParamMap.get('code') ?? '';\n\n if (!this.email || !this.code) {\n this.errorMessage.set('Invalid password reset link. Please request a new one.');\n }\n }\n\n onSubmit(): void {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n return;\n }\n\n if (!this.email || !this.code) {\n this.errorMessage.set('Invalid password reset link. Please request a new one.');\n return;\n }\n\n this.loading.set(true);\n this.errorMessage.set('');\n this.successMessage.set('');\n\n const { newPassword } = this.form.value;\n\n this.authService.resetPassword(this.email, this.code, newPassword!).subscribe({\n next: () => {\n this.loading.set(false);\n this.successMessage.set('Your password has been reset successfully.');\n },\n error: (err: HttpErrorResponse) => {\n this.loading.set(false);\n if (err.error?.detail) {\n this.errorMessage.set(err.error.detail);\n } else {\n this.errorMessage.set('Failed to reset password. The link may have expired.');\n }\n },\n });\n }\n}\n\nexport default SparkResetPasswordComponent;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["passwordMatchValidator"],"mappings":";;;;;;;;;;;;MAQa,iBAAiB,GAAG,IAAI,cAAc,CAAkB,mBAAmB;AAEjF,MAAM,sBAAsB,GAAoB;AACrD,IAAA,WAAW,EAAE,aAAa;AAC1B,IAAA,kBAAkB,EAAE,GAAG;AACvB,IAAA,QAAQ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I;AAChB,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,YAAY,CAAC;AACxD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiET,EAAA,CAAA;AACF,iBAAA;;;;;;;;;ACvFD;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@mintplayer/ng-spark-auth",
3
+ "private": false,
4
+ "version": "0.0.1",
5
+ "description": "Angular authentication library for MintPlayer.Spark",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/MintPlayer/MintPlayer.Spark",
9
+ "directory": "packages/ng-spark-auth"
10
+ },
11
+ "peerDependencies": {
12
+ "@angular/core": "^21.0.0",
13
+ "@angular/common": "^21.0.0",
14
+ "@angular/router": "^21.0.0",
15
+ "@angular/forms": "^21.0.0",
16
+ "@mintplayer/ng-bootstrap": "^21.0.0",
17
+ "rxjs": "~7.8.0"
18
+ },
19
+ "sideEffects": false,
20
+ "module": "fesm2022/mintplayer-ng-spark-auth.mjs",
21
+ "typings": "types/mintplayer-ng-spark-auth.d.ts",
22
+ "exports": {
23
+ "./package.json": {
24
+ "default": "./package.json"
25
+ },
26
+ ".": {
27
+ "types": "./types/mintplayer-ng-spark-auth.d.ts",
28
+ "default": "./fesm2022/mintplayer-ng-spark-auth.mjs"
29
+ }
30
+ },
31
+ "dependencies": {
32
+ "tslib": "^2.3.0"
33
+ }
34
+ }
@@ -0,0 +1,168 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, Type, EnvironmentProviders, OnInit } from '@angular/core';
3
+ import { Observable } from 'rxjs';
4
+ import { HttpInterceptorFn, HttpFeature, HttpFeatureKind } from '@angular/common/http';
5
+ import { CanActivateFn } from '@angular/router';
6
+ import * as _mintplayer_ng_spark_auth from '@mintplayer/ng-spark-auth';
7
+ import * as _angular_forms from '@angular/forms';
8
+
9
+ interface AuthUser {
10
+ isAuthenticated: boolean;
11
+ userName: string;
12
+ email: string;
13
+ roles: string[];
14
+ }
15
+
16
+ interface SparkAuthConfig {
17
+ apiBasePath: string;
18
+ defaultRedirectUrl: string;
19
+ loginUrl: string;
20
+ }
21
+ declare const SPARK_AUTH_CONFIG: InjectionToken<SparkAuthConfig>;
22
+ declare const defaultSparkAuthConfig: SparkAuthConfig;
23
+
24
+ type SparkAuthRouteEntry = string | {
25
+ path: string;
26
+ component?: Type<unknown>;
27
+ };
28
+ interface SparkAuthRouteConfig {
29
+ login?: SparkAuthRouteEntry;
30
+ twoFactor?: SparkAuthRouteEntry;
31
+ register?: SparkAuthRouteEntry;
32
+ forgotPassword?: SparkAuthRouteEntry;
33
+ resetPassword?: SparkAuthRouteEntry;
34
+ }
35
+ type SparkAuthRoutePaths = Required<Record<keyof SparkAuthRouteConfig, string>>;
36
+ declare const SPARK_AUTH_ROUTE_PATHS: InjectionToken<Required<Record<keyof SparkAuthRouteConfig, string>>>;
37
+
38
+ declare class SparkAuthService {
39
+ private readonly http;
40
+ private readonly config;
41
+ private readonly currentUser;
42
+ readonly user: _angular_core.Signal<AuthUser>;
43
+ readonly isAuthenticated: _angular_core.Signal<boolean>;
44
+ constructor();
45
+ login(email: string, password: string): Observable<void>;
46
+ loginTwoFactor(twoFactorCode: string, twoFactorRecoveryCode?: string): Observable<void>;
47
+ register(email: string, password: string): Observable<void>;
48
+ logout(): Observable<void>;
49
+ csrfRefresh(): Observable<void>;
50
+ checkAuth(): Observable<AuthUser | null>;
51
+ forgotPassword(email: string): Observable<void>;
52
+ resetPassword(email: string, resetCode: string, newPassword: string): Observable<void>;
53
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkAuthService, never>;
54
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SparkAuthService>;
55
+ }
56
+
57
+ declare const sparkAuthInterceptor: HttpInterceptorFn;
58
+
59
+ declare const sparkAuthGuard: CanActivateFn;
60
+
61
+ declare function provideSparkAuth(config?: Partial<SparkAuthConfig>): EnvironmentProviders;
62
+ declare function withSparkAuth(): HttpFeature<HttpFeatureKind>[];
63
+
64
+ declare function sparkAuthRoutes(config?: SparkAuthRouteConfig): any[];
65
+
66
+ declare class SparkAuthBarComponent {
67
+ readonly authService: SparkAuthService;
68
+ readonly config: _mintplayer_ng_spark_auth.SparkAuthConfig;
69
+ private readonly router;
70
+ onLogout(): void;
71
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkAuthBarComponent, never>;
72
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkAuthBarComponent, "spark-auth-bar", never, {}, {}, never, never, true, never>;
73
+ }
74
+
75
+ declare class SparkLoginComponent {
76
+ private readonly fb;
77
+ private readonly authService;
78
+ private readonly router;
79
+ private readonly route;
80
+ private readonly config;
81
+ readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
82
+ readonly loading: _angular_core.WritableSignal<boolean>;
83
+ readonly errorMessage: _angular_core.WritableSignal<string>;
84
+ readonly form: _angular_forms.FormGroup<{
85
+ email: _angular_forms.FormControl<string>;
86
+ password: _angular_forms.FormControl<string>;
87
+ rememberMe: _angular_forms.FormControl<boolean>;
88
+ }>;
89
+ onSubmit(): void;
90
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkLoginComponent, never>;
91
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkLoginComponent, "spark-login", never, {}, {}, never, never, true, never>;
92
+ }
93
+
94
+ declare class SparkTwoFactorComponent {
95
+ private readonly fb;
96
+ private readonly authService;
97
+ private readonly router;
98
+ private readonly route;
99
+ private readonly config;
100
+ readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
101
+ readonly loading: _angular_core.WritableSignal<boolean>;
102
+ readonly errorMessage: _angular_core.WritableSignal<string>;
103
+ readonly useRecoveryCode: _angular_core.WritableSignal<boolean>;
104
+ readonly form: _angular_forms.FormGroup<{
105
+ code: _angular_forms.FormControl<string>;
106
+ recoveryCode: _angular_forms.FormControl<string>;
107
+ }>;
108
+ toggleRecoveryCode(): void;
109
+ onSubmit(): void;
110
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkTwoFactorComponent, never>;
111
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkTwoFactorComponent, "spark-two-factor", never, {}, {}, never, never, true, never>;
112
+ }
113
+
114
+ declare class SparkRegisterComponent {
115
+ private readonly fb;
116
+ private readonly authService;
117
+ private readonly router;
118
+ readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
119
+ readonly loading: _angular_core.WritableSignal<boolean>;
120
+ readonly errorMessage: _angular_core.WritableSignal<string>;
121
+ readonly form: _angular_forms.FormGroup<{
122
+ email: _angular_forms.FormControl<string>;
123
+ password: _angular_forms.FormControl<string>;
124
+ confirmPassword: _angular_forms.FormControl<string>;
125
+ }>;
126
+ onSubmit(): void;
127
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkRegisterComponent, never>;
128
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkRegisterComponent, "spark-register", never, {}, {}, never, never, true, never>;
129
+ }
130
+
131
+ declare class SparkForgotPasswordComponent {
132
+ private readonly fb;
133
+ private readonly authService;
134
+ readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
135
+ readonly loading: _angular_core.WritableSignal<boolean>;
136
+ readonly errorMessage: _angular_core.WritableSignal<string>;
137
+ readonly successMessage: _angular_core.WritableSignal<string>;
138
+ readonly form: _angular_forms.FormGroup<{
139
+ email: _angular_forms.FormControl<string>;
140
+ }>;
141
+ onSubmit(): void;
142
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkForgotPasswordComponent, never>;
143
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkForgotPasswordComponent, "spark-forgot-password", never, {}, {}, never, never, true, never>;
144
+ }
145
+
146
+ declare class SparkResetPasswordComponent implements OnInit {
147
+ private readonly fb;
148
+ private readonly authService;
149
+ private readonly router;
150
+ private readonly route;
151
+ readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
152
+ readonly loading: _angular_core.WritableSignal<boolean>;
153
+ readonly errorMessage: _angular_core.WritableSignal<string>;
154
+ readonly successMessage: _angular_core.WritableSignal<string>;
155
+ private email;
156
+ private code;
157
+ readonly form: _angular_forms.FormGroup<{
158
+ newPassword: _angular_forms.FormControl<string>;
159
+ confirmPassword: _angular_forms.FormControl<string>;
160
+ }>;
161
+ ngOnInit(): void;
162
+ onSubmit(): void;
163
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkResetPasswordComponent, never>;
164
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkResetPasswordComponent, "spark-reset-password", never, {}, {}, never, never, true, never>;
165
+ }
166
+
167
+ export { SPARK_AUTH_CONFIG, SPARK_AUTH_ROUTE_PATHS, SparkAuthBarComponent, SparkAuthService, SparkForgotPasswordComponent, SparkLoginComponent, SparkRegisterComponent, SparkResetPasswordComponent, SparkTwoFactorComponent, defaultSparkAuthConfig, provideSparkAuth, sparkAuthGuard, sparkAuthInterceptor, sparkAuthRoutes, withSparkAuth };
168
+ export type { AuthUser, SparkAuthConfig, SparkAuthRouteConfig, SparkAuthRouteEntry, SparkAuthRoutePaths };