@mintplayer/ng-spark-auth 0.0.1 → 0.0.2
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.
|
@@ -1 +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,GAA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AA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,YAAY,CAAC;AACxD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiET,EAAA,CAAA;AACF,iBAAA;;;;;;;;;ACvFD;;AAEG;;;;"}
|
|
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/services/spark-auth-translation.service.ts","../../src/lib/pipes/translate-key.pipe.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 { Injectable, inject, signal } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\ntype TranslatedString = Record<string, string>;\n\n@Injectable({ providedIn: 'root' })\nexport class SparkAuthTranslationService {\n private readonly http = inject(HttpClient);\n private readonly translationsMap = signal<Record<string, TranslatedString>>({});\n\n constructor() {\n this.http.get<Record<string, TranslatedString>>('/spark/translations').subscribe(t => {\n this.translationsMap.set(t);\n });\n }\n\n t(key: string): string {\n const ts = this.translationsMap()[key];\n if (!ts) return key;\n const lang = localStorage.getItem('spark-lang') ?? navigator.language?.split('-')[0] ?? 'en';\n return ts[lang] ?? ts['en'] ?? Object.values(ts)[0] ?? key;\n }\n}\n","import { Pipe, PipeTransform, inject } from '@angular/core';\nimport { SparkAuthTranslationService } from '../services/spark-auth-translation.service';\n\n@Pipe({ name: 't', pure: false, standalone: true })\nexport class TranslateKeyPipe implements PipeTransform {\n private readonly translation = inject(SparkAuthTranslationService);\n\n transform(key: string): string {\n return this.translation.t(key);\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';\nimport { TranslateKeyPipe } from '../../pipes/translate-key.pipe';\n\n@Component({\n selector: 'spark-auth-bar',\n standalone: true,\n imports: [RouterLink, TranslateKeyPipe],\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()\">{{ 'authLogout' | t }}</button>\n } @else {\n <a class=\"btn btn-outline-light btn-sm\" [routerLink]=\"config.loginUrl\">{{ 'authLogin' | t }}</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';\nimport { TranslateKeyPipe } from '../../pipes/translate-key.pipe';\nimport { SparkAuthTranslationService } from '../../services/spark-auth-translation.service';\n\n@Component({\n selector: 'spark-login',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule, BsToggleButtonModule, TranslateKeyPipe],\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\">{{ 'authLogin' | t }}</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\">{{ 'authEmail' | t }}</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\">{{ 'authPassword' | t }}</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'\">{{ 'authRememberMe' | t }}</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 {{ 'authLogin' | t }}\n </button>\n </form>\n </bs-form>\n\n <div class=\"mt-3 text-center\">\n <a [routerLink]=\"routePaths.register\">{{ 'authCreateAccount' | t }}</a>\n </div>\n <div class=\"mt-2 text-center\">\n <a [routerLink]=\"routePaths.forgotPassword\">{{ 'authForgotPassword' | t }}</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 private readonly translation = inject(SparkAuthTranslationService);\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(this.translation.t('authInvalidCredentials'));\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';\nimport { TranslateKeyPipe } from '../../pipes/translate-key.pipe';\nimport { SparkAuthTranslationService } from '../../services/spark-auth-translation.service';\n\n@Component({\n selector: 'spark-two-factor',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule, TranslateKeyPipe],\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\">{{ 'authTwoFactorTitle' | t }}</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\">{{ 'authCode' | t }}</label>\n <input\n type=\"text\"\n id=\"code\"\n formControlName=\"code\"\n autocomplete=\"one-time-code\"\n maxlength=\"6\"\n [placeholder]=\"'authEnterCode' | t\"\n />\n </div>\n } @else {\n <div class=\"mb-3\">\n <label for=\"recoveryCode\" class=\"form-label\">{{ 'authRecoveryCode' | t }}</label>\n <input\n type=\"text\"\n id=\"recoveryCode\"\n formControlName=\"recoveryCode\"\n autocomplete=\"off\"\n [placeholder]=\"'authEnterRecoveryCode' | t\"\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 {{ 'authVerify' | t }}\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 {{ 'authUseAuthCode' | t }}\n } @else {\n {{ 'authUseRecoveryCode' | t }}\n }\n </button>\n </div>\n <div class=\"mt-2 text-center\">\n <a [routerLink]=\"routePaths.login\">{{ 'authBackToLogin' | t }}</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 private readonly translation = inject(SparkAuthTranslationService);\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\n ? this.translation.t('authEnterRecoveryCodeError')\n : this.translation.t('authEnterCodeError'));\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(this.translation.t('authInvalidCode'));\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';\nimport { TranslateKeyPipe } from '../../pipes/translate-key.pipe';\nimport { SparkAuthTranslationService } from '../../services/spark-auth-translation.service';\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, TranslateKeyPipe],\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\">{{ 'authRegister' | t }}</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\">{{ 'authEmail' | t }}</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\">{{ 'authInvalidEmail' | t }}</div>\n }\n </div>\n\n <div class=\"mb-3\">\n <label for=\"password\" class=\"form-label\">{{ 'authPassword' | t }}</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\">{{ 'authConfirmPassword' | t }}</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\">{{ 'authPasswordMismatch' | t }}</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 {{ 'authRegister' | t }}\n </button>\n </form>\n </bs-form>\n\n <div class=\"mt-3 text-center\">\n <span>{{ 'authAlreadyHaveAccount' | t }} </span>\n <a [routerLink]=\"routePaths.login\">{{ 'authLogin' | t }}</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 private readonly translation = inject(SparkAuthTranslationService);\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(this.translation.t('authRegistrationFailed'));\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';\nimport { TranslateKeyPipe } from '../../pipes/translate-key.pipe';\nimport { SparkAuthTranslationService } from '../../services/spark-auth-translation.service';\n\n@Component({\n selector: 'spark-forgot-password',\n standalone: true,\n imports: [ReactiveFormsModule, RouterLink, BsFormModule, TranslateKeyPipe],\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\">{{ 'authForgotPasswordTitle' | t }}</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 {{ 'authForgotPasswordDescription' | t }}\n </p>\n\n <bs-form>\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\n <div class=\"mb-3\">\n <label for=\"email\" class=\"form-label\">{{ 'authEmail' | t }}</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 {{ 'authSendResetLink' | t }}\n </button>\n </form>\n </bs-form>\n }\n\n <div class=\"mt-3 text-center\">\n <a [routerLink]=\"routePaths.login\">{{ 'authBackToLogin' | t }}</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 private readonly translation = inject(SparkAuthTranslationService);\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(this.translation.t('authForgotPasswordSuccess'));\n },\n error: () => {\n this.loading.set(false);\n // Don't reveal whether the email exists\n this.successMessage.set(this.translation.t('authForgotPasswordSuccess'));\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';\nimport { TranslateKeyPipe } from '../../pipes/translate-key.pipe';\nimport { SparkAuthTranslationService } from '../../services/spark-auth-translation.service';\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, TranslateKeyPipe],\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\">{{ 'authResetPassword' | t }}</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\">{{ 'authGoToLogin' | t }}</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\">{{ 'authNewPassword' | t }}</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\">{{ 'authConfirmPassword' | t }}</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\">{{ 'authPasswordMismatch' | t }}</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 {{ 'authResetPassword' | t }}\n </button>\n </form>\n </bs-form>\n\n <div class=\"mt-3 text-center\">\n <a [routerLink]=\"routePaths.login\">{{ 'authBackToLogin' | t }}</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 private readonly translation = inject(SparkAuthTranslationService);\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(this.translation.t('authInvalidResetLink'));\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(this.translation.t('authInvalidResetLink'));\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(this.translation.t('authResetSuccess'));\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(this.translation.t('authResetFailed'));\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,EAAE,QAAQ;;;MCCP,sBAAsB,GAAG,IAAI,cAAc,CAAsB,wBAAwB;;MCRzF,gBAAgB,CAAA;AACV,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,MAAM,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAElC,IAAA,WAAW,GAAG,MAAM,CAAkB,IAAI,uDAAC;AAEnD,IAAA,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE;AACpC,IAAA,eAAe,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,EAAE,eAAe,KAAK,IAAI,2DAAC;AAEvF,IAAA,WAAA,GAAA;AACE,QAAA,IAAI,CA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,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,mBAAmB,EAAE,UAAU,EAAE,YAAY,EAAE,gBAAgB,CAAC;AAC1E,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiET,EAAA,CAAA;AACF,iBAAA;;;;;;;;;ACzFD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { InjectionToken, Type, EnvironmentProviders, OnInit } from '@angular/core';
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Type, PipeTransform, EnvironmentProviders, OnInit } from '@angular/core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { HttpInterceptorFn, HttpFeature, HttpFeatureKind } from '@angular/common/http';
|
|
5
5
|
import { CanActivateFn } from '@angular/router';
|
|
@@ -39,8 +39,8 @@ declare class SparkAuthService {
|
|
|
39
39
|
private readonly http;
|
|
40
40
|
private readonly config;
|
|
41
41
|
private readonly currentUser;
|
|
42
|
-
readonly user:
|
|
43
|
-
readonly isAuthenticated:
|
|
42
|
+
readonly user: i0.Signal<AuthUser>;
|
|
43
|
+
readonly isAuthenticated: i0.Signal<boolean>;
|
|
44
44
|
constructor();
|
|
45
45
|
login(email: string, password: string): Observable<void>;
|
|
46
46
|
loginTwoFactor(twoFactorCode: string, twoFactorRecoveryCode?: string): Observable<void>;
|
|
@@ -50,8 +50,24 @@ declare class SparkAuthService {
|
|
|
50
50
|
checkAuth(): Observable<AuthUser | null>;
|
|
51
51
|
forgotPassword(email: string): Observable<void>;
|
|
52
52
|
resetPassword(email: string, resetCode: string, newPassword: string): Observable<void>;
|
|
53
|
-
static ɵfac:
|
|
54
|
-
static ɵprov:
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkAuthService, never>;
|
|
54
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SparkAuthService>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare class SparkAuthTranslationService {
|
|
58
|
+
private readonly http;
|
|
59
|
+
private readonly translationsMap;
|
|
60
|
+
constructor();
|
|
61
|
+
t(key: string): string;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkAuthTranslationService, never>;
|
|
63
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SparkAuthTranslationService>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare class TranslateKeyPipe implements PipeTransform {
|
|
67
|
+
private readonly translation;
|
|
68
|
+
transform(key: string): string;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateKeyPipe, never>;
|
|
70
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TranslateKeyPipe, "t", true>;
|
|
55
71
|
}
|
|
56
72
|
|
|
57
73
|
declare const sparkAuthInterceptor: HttpInterceptorFn;
|
|
@@ -68,8 +84,8 @@ declare class SparkAuthBarComponent {
|
|
|
68
84
|
readonly config: _mintplayer_ng_spark_auth.SparkAuthConfig;
|
|
69
85
|
private readonly router;
|
|
70
86
|
onLogout(): void;
|
|
71
|
-
static ɵfac:
|
|
72
|
-
static ɵcmp:
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkAuthBarComponent, never>;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkAuthBarComponent, "spark-auth-bar", never, {}, {}, never, never, true, never>;
|
|
73
89
|
}
|
|
74
90
|
|
|
75
91
|
declare class SparkLoginComponent {
|
|
@@ -78,17 +94,18 @@ declare class SparkLoginComponent {
|
|
|
78
94
|
private readonly router;
|
|
79
95
|
private readonly route;
|
|
80
96
|
private readonly config;
|
|
97
|
+
private readonly translation;
|
|
81
98
|
readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
|
|
82
|
-
readonly loading:
|
|
83
|
-
readonly errorMessage:
|
|
99
|
+
readonly loading: i0.WritableSignal<boolean>;
|
|
100
|
+
readonly errorMessage: i0.WritableSignal<string>;
|
|
84
101
|
readonly form: _angular_forms.FormGroup<{
|
|
85
102
|
email: _angular_forms.FormControl<string>;
|
|
86
103
|
password: _angular_forms.FormControl<string>;
|
|
87
104
|
rememberMe: _angular_forms.FormControl<boolean>;
|
|
88
105
|
}>;
|
|
89
106
|
onSubmit(): void;
|
|
90
|
-
static ɵfac:
|
|
91
|
-
static ɵcmp:
|
|
107
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkLoginComponent, never>;
|
|
108
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkLoginComponent, "spark-login", never, {}, {}, never, never, true, never>;
|
|
92
109
|
}
|
|
93
110
|
|
|
94
111
|
declare class SparkTwoFactorComponent {
|
|
@@ -97,50 +114,53 @@ declare class SparkTwoFactorComponent {
|
|
|
97
114
|
private readonly router;
|
|
98
115
|
private readonly route;
|
|
99
116
|
private readonly config;
|
|
117
|
+
private readonly translation;
|
|
100
118
|
readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
|
|
101
|
-
readonly loading:
|
|
102
|
-
readonly errorMessage:
|
|
103
|
-
readonly useRecoveryCode:
|
|
119
|
+
readonly loading: i0.WritableSignal<boolean>;
|
|
120
|
+
readonly errorMessage: i0.WritableSignal<string>;
|
|
121
|
+
readonly useRecoveryCode: i0.WritableSignal<boolean>;
|
|
104
122
|
readonly form: _angular_forms.FormGroup<{
|
|
105
123
|
code: _angular_forms.FormControl<string>;
|
|
106
124
|
recoveryCode: _angular_forms.FormControl<string>;
|
|
107
125
|
}>;
|
|
108
126
|
toggleRecoveryCode(): void;
|
|
109
127
|
onSubmit(): void;
|
|
110
|
-
static ɵfac:
|
|
111
|
-
static ɵcmp:
|
|
128
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkTwoFactorComponent, never>;
|
|
129
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkTwoFactorComponent, "spark-two-factor", never, {}, {}, never, never, true, never>;
|
|
112
130
|
}
|
|
113
131
|
|
|
114
132
|
declare class SparkRegisterComponent {
|
|
115
133
|
private readonly fb;
|
|
116
134
|
private readonly authService;
|
|
117
135
|
private readonly router;
|
|
136
|
+
private readonly translation;
|
|
118
137
|
readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
|
|
119
|
-
readonly loading:
|
|
120
|
-
readonly errorMessage:
|
|
138
|
+
readonly loading: i0.WritableSignal<boolean>;
|
|
139
|
+
readonly errorMessage: i0.WritableSignal<string>;
|
|
121
140
|
readonly form: _angular_forms.FormGroup<{
|
|
122
141
|
email: _angular_forms.FormControl<string>;
|
|
123
142
|
password: _angular_forms.FormControl<string>;
|
|
124
143
|
confirmPassword: _angular_forms.FormControl<string>;
|
|
125
144
|
}>;
|
|
126
145
|
onSubmit(): void;
|
|
127
|
-
static ɵfac:
|
|
128
|
-
static ɵcmp:
|
|
146
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkRegisterComponent, never>;
|
|
147
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkRegisterComponent, "spark-register", never, {}, {}, never, never, true, never>;
|
|
129
148
|
}
|
|
130
149
|
|
|
131
150
|
declare class SparkForgotPasswordComponent {
|
|
132
151
|
private readonly fb;
|
|
133
152
|
private readonly authService;
|
|
153
|
+
private readonly translation;
|
|
134
154
|
readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
|
|
135
|
-
readonly loading:
|
|
136
|
-
readonly errorMessage:
|
|
137
|
-
readonly successMessage:
|
|
155
|
+
readonly loading: i0.WritableSignal<boolean>;
|
|
156
|
+
readonly errorMessage: i0.WritableSignal<string>;
|
|
157
|
+
readonly successMessage: i0.WritableSignal<string>;
|
|
138
158
|
readonly form: _angular_forms.FormGroup<{
|
|
139
159
|
email: _angular_forms.FormControl<string>;
|
|
140
160
|
}>;
|
|
141
161
|
onSubmit(): void;
|
|
142
|
-
static ɵfac:
|
|
143
|
-
static ɵcmp:
|
|
162
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkForgotPasswordComponent, never>;
|
|
163
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkForgotPasswordComponent, "spark-forgot-password", never, {}, {}, never, never, true, never>;
|
|
144
164
|
}
|
|
145
165
|
|
|
146
166
|
declare class SparkResetPasswordComponent implements OnInit {
|
|
@@ -148,10 +168,11 @@ declare class SparkResetPasswordComponent implements OnInit {
|
|
|
148
168
|
private readonly authService;
|
|
149
169
|
private readonly router;
|
|
150
170
|
private readonly route;
|
|
171
|
+
private readonly translation;
|
|
151
172
|
readonly routePaths: Required<Record<keyof _mintplayer_ng_spark_auth.SparkAuthRouteConfig, string>>;
|
|
152
|
-
readonly loading:
|
|
153
|
-
readonly errorMessage:
|
|
154
|
-
readonly successMessage:
|
|
173
|
+
readonly loading: i0.WritableSignal<boolean>;
|
|
174
|
+
readonly errorMessage: i0.WritableSignal<string>;
|
|
175
|
+
readonly successMessage: i0.WritableSignal<string>;
|
|
155
176
|
private email;
|
|
156
177
|
private code;
|
|
157
178
|
readonly form: _angular_forms.FormGroup<{
|
|
@@ -160,9 +181,9 @@ declare class SparkResetPasswordComponent implements OnInit {
|
|
|
160
181
|
}>;
|
|
161
182
|
ngOnInit(): void;
|
|
162
183
|
onSubmit(): void;
|
|
163
|
-
static ɵfac:
|
|
164
|
-
static ɵcmp:
|
|
184
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SparkResetPasswordComponent, never>;
|
|
185
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SparkResetPasswordComponent, "spark-reset-password", never, {}, {}, never, never, true, never>;
|
|
165
186
|
}
|
|
166
187
|
|
|
167
|
-
export { SPARK_AUTH_CONFIG, SPARK_AUTH_ROUTE_PATHS, SparkAuthBarComponent, SparkAuthService, SparkForgotPasswordComponent, SparkLoginComponent, SparkRegisterComponent, SparkResetPasswordComponent, SparkTwoFactorComponent, defaultSparkAuthConfig, provideSparkAuth, sparkAuthGuard, sparkAuthInterceptor, sparkAuthRoutes, withSparkAuth };
|
|
188
|
+
export { SPARK_AUTH_CONFIG, SPARK_AUTH_ROUTE_PATHS, SparkAuthBarComponent, SparkAuthService, SparkAuthTranslationService, SparkForgotPasswordComponent, SparkLoginComponent, SparkRegisterComponent, SparkResetPasswordComponent, SparkTwoFactorComponent, TranslateKeyPipe, defaultSparkAuthConfig, provideSparkAuth, sparkAuthGuard, sparkAuthInterceptor, sparkAuthRoutes, withSparkAuth };
|
|
168
189
|
export type { AuthUser, SparkAuthConfig, SparkAuthRouteConfig, SparkAuthRouteEntry, SparkAuthRoutePaths };
|