@descope/angular-sdk 0.0.0-next-a14bbb42-20231227 → 0.0.0-next-32627c0f-20231228

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.
Files changed (31) hide show
  1. package/package.json +16 -7
  2. package/environment.d.ts +0 -3
  3. package/esm2022/descope-angular-sdk.mjs +0 -5
  4. package/esm2022/environment.mjs +0 -4
  5. package/esm2022/lib/components/descope/descope.component.mjs +0 -106
  6. package/esm2022/lib/components/sign-in-flow/sign-in-flow.component.mjs +0 -40
  7. package/esm2022/lib/components/sign-up-flow/sign-up-flow.component.mjs +0 -40
  8. package/esm2022/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.mjs +0 -40
  9. package/esm2022/lib/descope-auth.module.mjs +0 -52
  10. package/esm2022/lib/services/descope-auth.guard.mjs +0 -15
  11. package/esm2022/lib/services/descope-auth.service.mjs +0 -139
  12. package/esm2022/lib/services/descope.interceptor.mjs +0 -51
  13. package/esm2022/lib/types/types.mjs +0 -6
  14. package/esm2022/lib/utils/constants.mjs +0 -7
  15. package/esm2022/lib/utils/helpers.mjs +0 -27
  16. package/esm2022/public-api.mjs +0 -13
  17. package/fesm2022/descope-angular-sdk.mjs +0 -500
  18. package/fesm2022/descope-angular-sdk.mjs.map +0 -1
  19. package/index.d.ts +0 -5
  20. package/lib/components/descope/descope.component.d.ts +0 -32
  21. package/lib/components/sign-in-flow/sign-in-flow.component.d.ts +0 -24
  22. package/lib/components/sign-up-flow/sign-up-flow.component.d.ts +0 -24
  23. package/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.d.ts +0 -24
  24. package/lib/descope-auth.module.d.ts +0 -14
  25. package/lib/services/descope-auth.guard.d.ts +0 -2
  26. package/lib/services/descope-auth.service.d.ts +0 -38
  27. package/lib/services/descope.interceptor.d.ts +0 -2
  28. package/lib/types/types.d.ts +0 -8
  29. package/lib/utils/constants.d.ts +0 -5
  30. package/lib/utils/helpers.d.ts +0 -5
  31. package/public-api.d.ts +0 -9
@@ -1 +0,0 @@
1
- {"version":3,"file":"descope-angular-sdk.mjs","sources":["../../projects/angular-sdk/src/lib/utils/helpers.ts","../../projects/angular-sdk/src/environment.ts","../../projects/angular-sdk/src/lib/utils/constants.ts","../../projects/angular-sdk/src/lib/types/types.ts","../../projects/angular-sdk/src/lib/services/descope-auth.service.ts","../../projects/angular-sdk/src/lib/services/descope-auth.guard.ts","../../projects/angular-sdk/src/lib/services/descope.interceptor.ts","../../projects/angular-sdk/src/lib/components/descope/descope.component.ts","../../projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.ts","../../projects/angular-sdk/src/lib/components/sign-in-flow/sign-in-flow.component.html","../../projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.ts","../../projects/angular-sdk/src/lib/components/sign-up-flow/sign-up-flow.component.html","../../projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.ts","../../projects/angular-sdk/src/lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component.html","../../projects/angular-sdk/src/lib/descope-auth.module.ts","../../projects/angular-sdk/src/public-api.ts","../../projects/angular-sdk/src/descope-angular-sdk.ts"],"sourcesContent":["import { from, Observable } from 'rxjs';\n\nexport type Observablefied<T> = {\n\t[K in keyof T]: T[K] extends (...args: infer Args) => Promise<infer R>\n\t\t? (...args: Args) => Observable<R>\n\t\t: T[K] extends (...args: infer Args) => infer R\n\t\t? (...args: Args) => R\n\t\t: T[K] extends object\n\t\t? Observablefied<T[K]>\n\t\t: T[K];\n};\n\nexport function observabilify<T>(value: T): Observablefied<T> {\n\t/* eslint-disable @typescript-eslint/no-explicit-any */\n\tconst observableValue: any = {};\n\n\tfor (const key in value) {\n\t\tif (typeof value[key] === 'function') {\n\t\t\tconst fn = value[key] as (...args: unknown[]) => unknown;\n\t\t\tobservableValue[key] = (...args: unknown[]) => {\n\t\t\t\tconst fnResult = fn(...args);\n\t\t\t\tif (fnResult instanceof Promise) {\n\t\t\t\t\treturn from(fnResult);\n\t\t\t\t} else {\n\t\t\t\t\treturn fnResult;\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (typeof value[key] === 'object' && value[key] !== null) {\n\t\t\tobservableValue[key] = observabilify(value[key]);\n\t\t} else {\n\t\t\tobservableValue[key] = value[key];\n\t\t}\n\t}\n\n\treturn observableValue as Observablefied<T>;\n}\n","export const environment = {\n buildVersion: '0.0.0-next-a14bbb42-20231227'\n};\n","import { environment } from '../../environment';\n\nexport const baseHeaders = {\n\t'x-descope-sdk-name': 'angular',\n\t'x-descope-sdk-version': environment.buildVersion\n};\n\nexport const isBrowser = () => typeof window !== 'undefined';\n","import { ILogger } from '@descope/web-component';\n\nexport class DescopeAuthConfig {\n\tprojectId = '';\n\tbaseUrl?: string;\n\tsessionTokenViaCookie?: boolean;\n\tpathsToIntercept?: string[];\n}\n\nexport type { ILogger };\n","import { Injectable } from '@angular/core';\nimport type { UserResponse } from '@descope/web-js-sdk';\nimport createSdk from '@descope/web-js-sdk';\nimport { BehaviorSubject, finalize, Observable, tap } from 'rxjs';\nimport { observabilify, Observablefied } from '../utils/helpers';\nimport { baseHeaders, isBrowser } from '../utils/constants';\nimport { DescopeAuthConfig } from '../types/types';\n\ntype DescopeSDK = ReturnType<typeof createSdk>;\ntype AngularDescopeSDK = Observablefied<DescopeSDK>;\n\nexport interface DescopeSession {\n\tisAuthenticated: boolean;\n\tisSessionLoading: boolean;\n\tsessionToken: string | null;\n}\n\nexport type DescopeUser = { user?: UserResponse; isUserLoading: boolean };\n\n@Injectable({\n\tprovidedIn: 'root'\n})\nexport class DescopeAuthService {\n\tpublic descopeSdk: AngularDescopeSDK;\n\tprivate readonly sessionSubject: BehaviorSubject<DescopeSession>;\n\tprivate readonly userSubject: BehaviorSubject<DescopeUser>;\n\treadonly session$: Observable<DescopeSession>;\n\treadonly user$: Observable<DescopeUser>;\n\n\tconstructor(config: DescopeAuthConfig) {\n\t\tthis.descopeSdk = observabilify<DescopeSDK>(\n\t\t\tcreateSdk({\n\t\t\t\t...config,\n\t\t\t\tpersistTokens: isBrowser() as true,\n\t\t\t\tautoRefresh: isBrowser() as true,\n\t\t\t\tbaseHeaders\n\t\t\t})\n\t\t);\n\n\t\tthis.sessionSubject = new BehaviorSubject<DescopeSession>({\n\t\t\tisAuthenticated: false,\n\t\t\tisSessionLoading: false,\n\t\t\tsessionToken: ''\n\t\t});\n\t\tthis.session$ = this.sessionSubject.asObservable();\n\t\tthis.userSubject = new BehaviorSubject<DescopeUser>({\n\t\t\tisUserLoading: false\n\t\t});\n\t\tthis.user$ = this.userSubject.asObservable();\n\t\tthis.descopeSdk.onSessionTokenChange(this.setSession.bind(this));\n\t\tthis.descopeSdk.onUserChange(this.setUser.bind(this));\n\t}\n\n\trefreshSession() {\n\t\tconst beforeRefreshSession = this.sessionSubject.value;\n\t\tthis.sessionSubject.next({\n\t\t\t...beforeRefreshSession,\n\t\t\tisSessionLoading: true\n\t\t});\n\t\treturn this.descopeSdk.refresh().pipe(\n\t\t\ttap((data) => {\n\t\t\t\tconst afterRequestSession = this.sessionSubject.value;\n\t\t\t\tif (data.ok && data.data) {\n\t\t\t\t\tthis.sessionSubject.next({\n\t\t\t\t\t\t...afterRequestSession,\n\t\t\t\t\t\tsessionToken: data.data.sessionJwt,\n\t\t\t\t\t\tisAuthenticated: !!data.data.sessionJwt\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.sessionSubject.next({\n\t\t\t\t\t\t...afterRequestSession,\n\t\t\t\t\t\tsessionToken: '',\n\t\t\t\t\t\tisAuthenticated: false\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfinalize(() => {\n\t\t\t\tconst afterRefreshSession = this.sessionSubject.value;\n\t\t\t\tthis.sessionSubject.next({\n\t\t\t\t\t...afterRefreshSession,\n\t\t\t\t\tisSessionLoading: false\n\t\t\t\t});\n\t\t\t})\n\t\t);\n\t}\n\n\trefreshUser() {\n\t\tconst beforeRefreshUser = this.userSubject.value;\n\t\tthis.userSubject.next({\n\t\t\t...beforeRefreshUser,\n\t\t\tisUserLoading: true\n\t\t});\n\t\treturn this.descopeSdk.me().pipe(\n\t\t\ttap((data) => {\n\t\t\t\tconst afterRequestUser = this.userSubject.value;\n\t\t\t\tif (data.data) {\n\t\t\t\t\tthis.userSubject.next({\n\t\t\t\t\t\t...afterRequestUser,\n\t\t\t\t\t\tuser: {\n\t\t\t\t\t\t\t...data.data\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}),\n\t\t\tfinalize(() => {\n\t\t\t\tconst afterRefreshUser = this.userSubject.value;\n\t\t\t\tthis.userSubject.next({\n\t\t\t\t\t...afterRefreshUser,\n\t\t\t\t\tisUserLoading: false\n\t\t\t\t});\n\t\t\t})\n\t\t);\n\t}\n\n\tgetSessionToken() {\n\t\tif (isBrowser()) {\n\t\t\treturn (\n\t\t\t\tthis.descopeSdk as AngularDescopeSDK & {\n\t\t\t\t\tgetSessionToken: () => string | null;\n\t\t\t\t}\n\t\t\t).getSessionToken();\n\t\t}\n\t\tconsole.warn('Get session token is not supported in SSR');\n\t\treturn '';\n\t}\n\n\tgetRefreshToken() {\n\t\tif (isBrowser()) {\n\t\t\treturn (\n\t\t\t\tthis.descopeSdk as AngularDescopeSDK & {\n\t\t\t\t\tgetRefreshToken: () => string | null;\n\t\t\t\t}\n\t\t\t).getRefreshToken();\n\t\t}\n\t\tthis.descopeSdk.getJwtPermissions;\n\t\tconsole.warn('Get refresh token is not supported in SSR');\n\t\treturn '';\n\t}\n\n\tgetJwtPermissions(token = this.getSessionToken(), tenant?: string) {\n\t\tif (token === null) {\n\t\t\tconsole.error('Could not get JWT Permissions - not authenticated');\n\t\t\treturn [];\n\t\t}\n\t\treturn this.descopeSdk.getJwtPermissions(token, tenant);\n\t}\n\n\tgetJwtRoles(token = this.getSessionToken(), tenant?: string) {\n\t\tif (token === null) {\n\t\t\tconsole.error('Could not get JWT Roles - not authenticated');\n\t\t\treturn [];\n\t\t}\n\t\treturn this.descopeSdk.getJwtRoles(token, tenant);\n\t}\n\n\tisAuthenticated() {\n\t\treturn this.sessionSubject.value.isAuthenticated;\n\t}\n\n\tprivate setSession(sessionToken: string | null) {\n\t\tconst currentSession = this.sessionSubject.value;\n\t\tthis.sessionSubject.next({\n\t\t\tsessionToken,\n\t\t\tisAuthenticated: !!sessionToken,\n\t\t\tisSessionLoading: currentSession.isSessionLoading\n\t\t});\n\t}\n\n\tprivate setUser(user: UserResponse) {\n\t\tconst currentUser = this.userSubject.value;\n\t\tthis.userSubject.next({\n\t\t\tisUserLoading: currentUser.isUserLoading,\n\t\t\tuser\n\t\t});\n\t}\n}\n","import { inject } from '@angular/core';\n\nimport { DescopeAuthService } from './descope-auth.service';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\nimport { from, of } from 'rxjs';\n\nexport const descopeAuthGuard = (route: ActivatedRouteSnapshot) => {\n\tconst authService = inject(DescopeAuthService);\n\tconst router = inject(Router);\n\tconst fallbackUrl = route.data['descopeFallbackUrl'];\n\tconst isAuthenticated = authService.isAuthenticated();\n\tif (!isAuthenticated && !!fallbackUrl) {\n\t\treturn from(router.navigate([fallbackUrl]));\n\t}\n\treturn of(isAuthenticated);\n};\n","import { inject } from '@angular/core';\nimport {\n\tHttpErrorResponse,\n\tHttpHandlerFn,\n\tHttpInterceptorFn,\n\tHttpRequest\n} from '@angular/common/http';\nimport { throwError } from 'rxjs';\nimport { catchError, switchMap } from 'rxjs/operators';\nimport { DescopeAuthService } from './descope-auth.service';\nimport { DescopeAuthConfig } from '../types/types';\n\nexport const descopeInterceptor: HttpInterceptorFn = (request, next) => {\n\tconst config = inject(DescopeAuthConfig);\n\tconst authService = inject(DescopeAuthService);\n\n\tfunction refreshAndRetry(\n\t\trequest: HttpRequest<unknown>,\n\t\tnext: HttpHandlerFn,\n\t\terror?: HttpErrorResponse\n\t) {\n\t\treturn authService.refreshSession().pipe(\n\t\t\tswitchMap((refreshed) => {\n\t\t\t\tif (refreshed.ok && refreshed.data) {\n\t\t\t\t\tconst requestWithRefreshedToken = addTokenToRequest(\n\t\t\t\t\t\trequest,\n\t\t\t\t\t\trefreshed.data?.sessionJwt\n\t\t\t\t\t);\n\t\t\t\t\treturn next(requestWithRefreshedToken);\n\t\t\t\t} else {\n\t\t\t\t\treturn throwError(\n\t\t\t\t\t\t() => error ?? new Error('Could not refresh session!')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t}\n\n\tfunction shouldIntercept(request: HttpRequest<unknown>): boolean {\n\t\treturn (\n\t\t\t(config.pathsToIntercept?.length === 0 ||\n\t\t\t\tconfig.pathsToIntercept?.some((path) => request.url.includes(path))) ??\n\t\t\ttrue\n\t\t);\n\t}\n\n\tfunction addTokenToRequest(\n\t\trequest: HttpRequest<unknown>,\n\t\ttoken: string\n\t): HttpRequest<unknown> {\n\t\treturn request.clone({\n\t\t\tsetHeaders: {\n\t\t\t\tAuthorization: `Bearer ${token}`\n\t\t\t}\n\t\t});\n\t}\n\n\tif (shouldIntercept(request)) {\n\t\tconst token = authService.getSessionToken();\n\t\tif (!token) {\n\t\t\treturn refreshAndRetry(request, next);\n\t\t}\n\t\tconst requestWithToken = addTokenToRequest(request, token);\n\t\treturn next(requestWithToken).pipe(\n\t\t\tcatchError((error: HttpErrorResponse) => {\n\t\t\t\tif (error.status === 401 || error.status === 403) {\n\t\t\t\t\treturn refreshAndRetry(request, next, error);\n\t\t\t\t} else {\n\t\t\t\t\treturn throwError(() => error);\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t} else {\n\t\treturn next(request);\n\t}\n};\n","import {\n\tComponent,\n\tElementRef,\n\tEventEmitter,\n\tInput,\n\tOnChanges,\n\tOnInit,\n\tOutput\n} from '@angular/core';\nimport DescopeWebComponent from '@descope/web-component';\nimport DescopeWc, { ILogger } from '@descope/web-component';\nimport { DescopeAuthService } from '../../services/descope-auth.service';\nimport { from } from 'rxjs';\nimport { baseHeaders } from '../../utils/constants';\nimport { DescopeAuthConfig } from '../../types/types';\n\n@Component({\n\tselector: 'descope[flowId]',\n\tstandalone: true,\n\ttemplate: ''\n})\nexport class DescopeComponent implements OnInit, OnChanges {\n\tprojectId: string;\n\t@Input() flowId: string;\n\n\t@Input() locale: string;\n\t@Input() theme: 'light' | 'dark' | 'os';\n\t@Input() tenant: string;\n\t@Input() telemetryKey: string;\n\t@Input() redirectUrl: string;\n\t@Input() autoFocus: true | false | 'skipFirstScreen';\n\n\t@Input() debug: boolean;\n\t@Input() errorTransformer: (error: { text: string; type: string }) => string;\n\t@Input() logger: ILogger;\n\n\t@Output() success: EventEmitter<void> = new EventEmitter<void>();\n\t@Output() error: EventEmitter<void> = new EventEmitter<void>();\n\n\tprivate readonly webComponent: DescopeWebComponent =\n\t\tnew DescopeWebComponent();\n\n\tconstructor(\n\t\tprivate elementRef: ElementRef,\n\t\tprivate authService: DescopeAuthService,\n\t\tdescopeConfig: DescopeAuthConfig\n\t) {\n\t\tthis.projectId = descopeConfig.projectId;\n\t}\n\n\tngOnInit() {\n\t\tDescopeWc.sdkConfigOverrides = { baseHeaders };\n\t\tthis.setupWebComponent();\n\t\tthis.elementRef.nativeElement.appendChild(this.webComponent);\n\t}\n\n\tngOnChanges(): void {\n\t\tthis.setupWebComponent();\n\t}\n\n\tprivate setupWebComponent() {\n\t\tthis.webComponent.setAttribute('project-id', this.projectId);\n\t\tthis.webComponent.setAttribute('flow-id', this.flowId);\n\t\tif (this.locale) {\n\t\t\tthis.webComponent.setAttribute('locale', this.locale);\n\t\t}\n\t\tif (this.theme) {\n\t\t\tthis.webComponent.setAttribute('theme', this.theme);\n\t\t}\n\t\tif (this.tenant) {\n\t\t\tthis.webComponent.setAttribute('tenant', this.tenant);\n\t\t}\n\t\tif (this.telemetryKey) {\n\t\t\tthis.webComponent.setAttribute('telemetryKey', this.telemetryKey);\n\t\t}\n\t\tif (this.redirectUrl) {\n\t\t\tthis.webComponent.setAttribute('redirect-url', this.redirectUrl);\n\t\t}\n\t\tif (this.autoFocus) {\n\t\t\tthis.webComponent.setAttribute('auto-focus', this.autoFocus.toString());\n\t\t}\n\t\tif (this.debug) {\n\t\t\tthis.webComponent.setAttribute('debug', this.debug.toString());\n\t\t}\n\n\t\tif (this.errorTransformer) {\n\t\t\tthis.webComponent.errorTransformer = this.errorTransformer;\n\t\t}\n\n\t\tif (this.logger) {\n\t\t\tthis.webComponent.logger = this.logger;\n\t\t}\n\n\t\tif (this.success) {\n\t\t\tthis.webComponent.addEventListener('success', (e: Event) => {\n\t\t\t\tfrom(\n\t\t\t\t\tthis.authService.descopeSdk.httpClient.hooks?.afterRequest!(\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t\t{} as any,\n\t\t\t\t\t\tnew Response(JSON.stringify((e as CustomEvent).detail))\n\t\t\t\t\t) as Promise<unknown>\n\t\t\t\t).subscribe(() => {\n\t\t\t\t\tthis.success?.emit();\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tif (this.error) {\n\t\t\tthis.webComponent.addEventListener('error', () => {\n\t\t\t\tthis.error?.emit();\n\t\t\t});\n\t\t}\n\t}\n}\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ILogger } from '@descope/web-component';\nimport { DescopeComponent } from '../descope/descope.component';\nimport { DescopeAuthConfig } from '../../types/types';\n\n@Component({\n\tselector: 'descope-sign-in-flow',\n\tstandalone: true,\n\timports: [DescopeComponent],\n\ttemplateUrl: './sign-in-flow.component.html'\n})\nexport class SignInFlowComponent {\n\tprojectId: string;\n\n\t@Input() locale: string;\n\t@Input() theme: 'light' | 'dark' | 'os';\n\t@Input() tenant: string;\n\t@Input() telemetryKey: string;\n\t@Input() redirectUrl: string;\n\t@Input() autoFocus: true | false | 'skipFirstScreen';\n\n\t@Input() debug: boolean;\n\t@Input() errorTransformer: (error: { text: string; type: string }) => string;\n\t@Input() logger: ILogger;\n\n\t@Output() success: EventEmitter<void> = new EventEmitter<void>();\n\t@Output() error: EventEmitter<void> = new EventEmitter<void>();\n\n\tconstructor(descopeConfig: DescopeAuthConfig) {\n\t\tthis.projectId = descopeConfig.projectId;\n\t}\n}\n","<descope\n\t(success)=\"success.emit()\"\n\t(error)=\"error.emit()\"\n\tflowId=\"sign-in\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[logger]=\"logger\"\n>\n</descope>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ILogger } from '@descope/web-component';\nimport { DescopeComponent } from '../descope/descope.component';\nimport { DescopeAuthConfig } from '../../types/types';\n\n@Component({\n\tselector: 'descope-sign-up-flow',\n\tstandalone: true,\n\timports: [DescopeComponent],\n\ttemplateUrl: './sign-up-flow.component.html'\n})\nexport class SignUpFlowComponent {\n\tprojectId: string;\n\n\t@Input() locale: string;\n\t@Input() theme: 'light' | 'dark' | 'os';\n\t@Input() tenant: string;\n\t@Input() telemetryKey: string;\n\t@Input() redirectUrl: string;\n\t@Input() autoFocus: true | false | 'skipFirstScreen';\n\n\t@Input() debug: boolean;\n\t@Input() errorTransformer: (error: { text: string; type: string }) => string;\n\t@Input() logger: ILogger;\n\n\t@Output() success: EventEmitter<void> = new EventEmitter<void>();\n\t@Output() error: EventEmitter<void> = new EventEmitter<void>();\n\n\tconstructor(descopeConfig: DescopeAuthConfig) {\n\t\tthis.projectId = descopeConfig.projectId;\n\t}\n}\n","<descope\n\t(success)=\"success.emit()\"\n\t(error)=\"error.emit()\"\n\tflowId=\"sign-up\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[logger]=\"logger\"\n>\n</descope>\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { ILogger } from '@descope/web-component';\nimport { DescopeComponent } from '../descope/descope.component';\nimport { DescopeAuthConfig } from '../../types/types';\n\n@Component({\n\tselector: 'descope-sign-up-or-in-flow',\n\tstandalone: true,\n\timports: [DescopeComponent],\n\ttemplateUrl: './sign-up-or-in-flow.component.html'\n})\nexport class SignUpOrInFlowComponent {\n\tprojectId: string;\n\n\t@Input() locale: string;\n\t@Input() theme: 'light' | 'dark' | 'os';\n\t@Input() tenant: string;\n\t@Input() telemetryKey: string;\n\t@Input() redirectUrl: string;\n\t@Input() autoFocus: true | false | 'skipFirstScreen';\n\n\t@Input() debug: boolean;\n\t@Input() errorTransformer: (error: { text: string; type: string }) => string;\n\t@Input() logger: ILogger;\n\n\t@Output() success: EventEmitter<void> = new EventEmitter<void>();\n\t@Output() error: EventEmitter<void> = new EventEmitter<void>();\n\n\tconstructor(descopeConfig: DescopeAuthConfig) {\n\t\tthis.projectId = descopeConfig.projectId;\n\t}\n}\n","<descope\n\t(success)=\"success.emit()\"\n\t(error)=\"error.emit()\"\n\tflowId=\"sign-up-or-in\"\n\t[locale]=\"locale\"\n\t[theme]=\"theme\"\n\t[tenant]=\"tenant\"\n\t[telemetryKey]=\"telemetryKey\"\n\t[redirectUrl]=\"redirectUrl\"\n\t[autoFocus]=\"autoFocus\"\n\t[debug]=\"debug\"\n\t[errorTransformer]=\"errorTransformer\"\n\t[logger]=\"logger\"\n>\n</descope>\n","import {\n\tCUSTOM_ELEMENTS_SCHEMA,\n\tModuleWithProviders,\n\tNgModule,\n\tOptional,\n\tSkipSelf\n} from '@angular/core';\nimport { DescopeComponent } from './components/descope/descope.component';\nimport { SignInFlowComponent } from './components/sign-in-flow/sign-in-flow.component';\nimport { SignUpFlowComponent } from './components/sign-up-flow/sign-up-flow.component';\nimport { SignUpOrInFlowComponent } from './components/sign-up-or-in-flow/sign-up-or-in-flow.component';\nimport { DescopeAuthConfig } from './types/types';\n\n@NgModule({\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\timports: [\n\t\tDescopeComponent,\n\t\tSignInFlowComponent,\n\t\tSignUpFlowComponent,\n\t\tSignUpOrInFlowComponent\n\t],\n\texports: [\n\t\tDescopeComponent,\n\t\tSignInFlowComponent,\n\t\tSignUpFlowComponent,\n\t\tSignUpOrInFlowComponent\n\t]\n})\nexport class DescopeAuthModule {\n\tconstructor(@Optional() @SkipSelf() parentModule?: DescopeAuthModule) {\n\t\tif (parentModule) {\n\t\t\tthrow new Error(\n\t\t\t\t'DescopeAuthModule is already loaded. Import it only once'\n\t\t\t);\n\t\t}\n\t}\n\n\tstatic forRoot(\n\t\tconfig?: DescopeAuthConfig\n\t): ModuleWithProviders<DescopeAuthModule> {\n\t\treturn {\n\t\t\tngModule: DescopeAuthModule,\n\t\t\tproviders: [{ provide: DescopeAuthConfig, useValue: config }]\n\t\t};\n\t}\n}\n","/*\n * Public API Surface of angular-sdk\n */\n\nexport * from './lib/services/descope-auth.service';\nexport * from './lib/services/descope-auth.guard';\nexport * from './lib/services/descope.interceptor';\nexport * from './lib/descope-auth.module';\nexport * from './lib/components/descope/descope.component';\nexport * from './lib/components/sign-in-flow/sign-in-flow.component';\nexport * from './lib/components/sign-up-flow/sign-up-flow.component';\nexport * from './lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component';\nexport * from './lib/types/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.DescopeAuthConfig","DescopeWc","i1.DescopeAuthService","i2.DescopeAuthConfig"],"mappings":";;;;;;;;AAYM,SAAU,aAAa,CAAI,KAAQ,EAAA;;IAExC,MAAM,eAAe,GAAQ,EAAE,CAAC;AAEhC,IAAA,KAAK,MAAM,GAAG,IAAI,KAAK,EAAE;AACxB,QAAA,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE;AACrC,YAAA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AgB;YAChB,mBAAmB;YACnB,mBAAmB;AACnB,YAAA,uBAAuB,aAGvB,gBAAgB;YAChB,mBAAmB;YACnB,mBAAmB;YACnB,uBAAuB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAGZ,iBAAiB,EAAA,CAAA,CAAA,EAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAf7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACR,gBAAgB;wBAChB,mBAAmB;wBACnB,mBAAmB;wBACnB,uBAAuB;AACvB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACR,gBAAgB;wBAChB,mBAAmB;wBACnB,mBAAmB;wBACnB,uBAAuB;AACvB,qBAAA;AACD,iBAAA,CAAA;;0BAEa,QAAQ;;0BAAI,QAAQ;;;AC7BlC;;AAEG;;ACFH;;AAEG;;;;"}
package/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@descope/angular-sdk" />
5
- export * from './public-api';
@@ -1,32 +0,0 @@
1
- import { ElementRef, EventEmitter, OnChanges, OnInit } from '@angular/core';
2
- import { ILogger } from '@descope/web-component';
3
- import { DescopeAuthService } from '../../services/descope-auth.service';
4
- import { DescopeAuthConfig } from '../../types/types';
5
- import * as i0 from "@angular/core";
6
- export declare class DescopeComponent implements OnInit, OnChanges {
7
- private elementRef;
8
- private authService;
9
- projectId: string;
10
- flowId: string;
11
- locale: string;
12
- theme: 'light' | 'dark' | 'os';
13
- tenant: string;
14
- telemetryKey: string;
15
- redirectUrl: string;
16
- autoFocus: true | false | 'skipFirstScreen';
17
- debug: boolean;
18
- errorTransformer: (error: {
19
- text: string;
20
- type: string;
21
- }) => string;
22
- logger: ILogger;
23
- success: EventEmitter<void>;
24
- error: EventEmitter<void>;
25
- private readonly webComponent;
26
- constructor(elementRef: ElementRef, authService: DescopeAuthService, descopeConfig: DescopeAuthConfig);
27
- ngOnInit(): void;
28
- ngOnChanges(): void;
29
- private setupWebComponent;
30
- static ɵfac: i0.ɵɵFactoryDeclaration<DescopeComponent, never>;
31
- static ɵcmp: i0.ɵɵComponentDeclaration<DescopeComponent, "descope[flowId]", never, { "flowId": { "alias": "flowId"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "tenant": { "alias": "tenant"; "required": false; }; "telemetryKey": { "alias": "telemetryKey"; "required": false; }; "redirectUrl": { "alias": "redirectUrl"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "errorTransformer": { "alias": "errorTransformer"; "required": false; }; "logger": { "alias": "logger"; "required": false; }; }, { "success": "success"; "error": "error"; }, never, never, true, never>;
32
- }
@@ -1,24 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { ILogger } from '@descope/web-component';
3
- import { DescopeAuthConfig } from '../../types/types';
4
- import * as i0 from "@angular/core";
5
- export declare class SignInFlowComponent {
6
- projectId: string;
7
- locale: string;
8
- theme: 'light' | 'dark' | 'os';
9
- tenant: string;
10
- telemetryKey: string;
11
- redirectUrl: string;
12
- autoFocus: true | false | 'skipFirstScreen';
13
- debug: boolean;
14
- errorTransformer: (error: {
15
- text: string;
16
- type: string;
17
- }) => string;
18
- logger: ILogger;
19
- success: EventEmitter<void>;
20
- error: EventEmitter<void>;
21
- constructor(descopeConfig: DescopeAuthConfig);
22
- static ɵfac: i0.ɵɵFactoryDeclaration<SignInFlowComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<SignInFlowComponent, "descope-sign-in-flow", never, { "locale": { "alias": "locale"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "tenant": { "alias": "tenant"; "required": false; }; "telemetryKey": { "alias": "telemetryKey"; "required": false; }; "redirectUrl": { "alias": "redirectUrl"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "errorTransformer": { "alias": "errorTransformer"; "required": false; }; "logger": { "alias": "logger"; "required": false; }; }, { "success": "success"; "error": "error"; }, never, never, true, never>;
24
- }
@@ -1,24 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { ILogger } from '@descope/web-component';
3
- import { DescopeAuthConfig } from '../../types/types';
4
- import * as i0 from "@angular/core";
5
- export declare class SignUpFlowComponent {
6
- projectId: string;
7
- locale: string;
8
- theme: 'light' | 'dark' | 'os';
9
- tenant: string;
10
- telemetryKey: string;
11
- redirectUrl: string;
12
- autoFocus: true | false | 'skipFirstScreen';
13
- debug: boolean;
14
- errorTransformer: (error: {
15
- text: string;
16
- type: string;
17
- }) => string;
18
- logger: ILogger;
19
- success: EventEmitter<void>;
20
- error: EventEmitter<void>;
21
- constructor(descopeConfig: DescopeAuthConfig);
22
- static ɵfac: i0.ɵɵFactoryDeclaration<SignUpFlowComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<SignUpFlowComponent, "descope-sign-up-flow", never, { "locale": { "alias": "locale"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "tenant": { "alias": "tenant"; "required": false; }; "telemetryKey": { "alias": "telemetryKey"; "required": false; }; "redirectUrl": { "alias": "redirectUrl"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "errorTransformer": { "alias": "errorTransformer"; "required": false; }; "logger": { "alias": "logger"; "required": false; }; }, { "success": "success"; "error": "error"; }, never, never, true, never>;
24
- }
@@ -1,24 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { ILogger } from '@descope/web-component';
3
- import { DescopeAuthConfig } from '../../types/types';
4
- import * as i0 from "@angular/core";
5
- export declare class SignUpOrInFlowComponent {
6
- projectId: string;
7
- locale: string;
8
- theme: 'light' | 'dark' | 'os';
9
- tenant: string;
10
- telemetryKey: string;
11
- redirectUrl: string;
12
- autoFocus: true | false | 'skipFirstScreen';
13
- debug: boolean;
14
- errorTransformer: (error: {
15
- text: string;
16
- type: string;
17
- }) => string;
18
- logger: ILogger;
19
- success: EventEmitter<void>;
20
- error: EventEmitter<void>;
21
- constructor(descopeConfig: DescopeAuthConfig);
22
- static ɵfac: i0.ɵɵFactoryDeclaration<SignUpOrInFlowComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<SignUpOrInFlowComponent, "descope-sign-up-or-in-flow", never, { "locale": { "alias": "locale"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "tenant": { "alias": "tenant"; "required": false; }; "telemetryKey": { "alias": "telemetryKey"; "required": false; }; "redirectUrl": { "alias": "redirectUrl"; "required": false; }; "autoFocus": { "alias": "autoFocus"; "required": false; }; "debug": { "alias": "debug"; "required": false; }; "errorTransformer": { "alias": "errorTransformer"; "required": false; }; "logger": { "alias": "logger"; "required": false; }; }, { "success": "success"; "error": "error"; }, never, never, true, never>;
24
- }
@@ -1,14 +0,0 @@
1
- import { ModuleWithProviders } from '@angular/core';
2
- import { DescopeAuthConfig } from './types/types';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "./components/descope/descope.component";
5
- import * as i2 from "./components/sign-in-flow/sign-in-flow.component";
6
- import * as i3 from "./components/sign-up-flow/sign-up-flow.component";
7
- import * as i4 from "./components/sign-up-or-in-flow/sign-up-or-in-flow.component";
8
- export declare class DescopeAuthModule {
9
- constructor(parentModule?: DescopeAuthModule);
10
- static forRoot(config?: DescopeAuthConfig): ModuleWithProviders<DescopeAuthModule>;
11
- static ɵfac: i0.ɵɵFactoryDeclaration<DescopeAuthModule, [{ optional: true; skipSelf: true; }]>;
12
- static ɵmod: i0.ɵɵNgModuleDeclaration<DescopeAuthModule, never, [typeof i1.DescopeComponent, typeof i2.SignInFlowComponent, typeof i3.SignUpFlowComponent, typeof i4.SignUpOrInFlowComponent], [typeof i1.DescopeComponent, typeof i2.SignInFlowComponent, typeof i3.SignUpFlowComponent, typeof i4.SignUpOrInFlowComponent]>;
13
- static ɵinj: i0.ɵɵInjectorDeclaration<DescopeAuthModule>;
14
- }
@@ -1,2 +0,0 @@
1
- import { ActivatedRouteSnapshot } from '@angular/router';
2
- export declare const descopeAuthGuard: (route: ActivatedRouteSnapshot) => import("rxjs").Observable<boolean>;
@@ -1,38 +0,0 @@
1
- /// <reference types="core-js-sdk" />
2
- import type { UserResponse } from '@descope/web-js-sdk';
3
- import createSdk from '@descope/web-js-sdk';
4
- import { Observable } from 'rxjs';
5
- import { Observablefied } from '../utils/helpers';
6
- import { DescopeAuthConfig } from '../types/types';
7
- import * as i0 from "@angular/core";
8
- type DescopeSDK = ReturnType<typeof createSdk>;
9
- type AngularDescopeSDK = Observablefied<DescopeSDK>;
10
- export interface DescopeSession {
11
- isAuthenticated: boolean;
12
- isSessionLoading: boolean;
13
- sessionToken: string | null;
14
- }
15
- export type DescopeUser = {
16
- user?: UserResponse;
17
- isUserLoading: boolean;
18
- };
19
- export declare class DescopeAuthService {
20
- descopeSdk: AngularDescopeSDK;
21
- private readonly sessionSubject;
22
- private readonly userSubject;
23
- readonly session$: Observable<DescopeSession>;
24
- readonly user$: Observable<DescopeUser>;
25
- constructor(config: DescopeAuthConfig);
26
- refreshSession(): Observable<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
27
- refreshUser(): Observable<import("@descope/core-js-sdk").SdkResponse<UserResponse>>;
28
- getSessionToken(): string | null;
29
- getRefreshToken(): string | null;
30
- getJwtPermissions(token?: string | null, tenant?: string): string[];
31
- getJwtRoles(token?: string | null, tenant?: string): string[];
32
- isAuthenticated(): boolean;
33
- private setSession;
34
- private setUser;
35
- static ɵfac: i0.ɵɵFactoryDeclaration<DescopeAuthService, never>;
36
- static ɵprov: i0.ɵɵInjectableDeclaration<DescopeAuthService>;
37
- }
38
- export {};
@@ -1,2 +0,0 @@
1
- import { HttpInterceptorFn } from '@angular/common/http';
2
- export declare const descopeInterceptor: HttpInterceptorFn;
@@ -1,8 +0,0 @@
1
- import { ILogger } from '@descope/web-component';
2
- export declare class DescopeAuthConfig {
3
- projectId: string;
4
- baseUrl?: string;
5
- sessionTokenViaCookie?: boolean;
6
- pathsToIntercept?: string[];
7
- }
8
- export type { ILogger };
@@ -1,5 +0,0 @@
1
- export declare const baseHeaders: {
2
- 'x-descope-sdk-name': string;
3
- 'x-descope-sdk-version': string;
4
- };
5
- export declare const isBrowser: () => boolean;
@@ -1,5 +0,0 @@
1
- import { Observable } from 'rxjs';
2
- export type Observablefied<T> = {
3
- [K in keyof T]: T[K] extends (...args: infer Args) => Promise<infer R> ? (...args: Args) => Observable<R> : T[K] extends (...args: infer Args) => infer R ? (...args: Args) => R : T[K] extends object ? Observablefied<T[K]> : T[K];
4
- };
5
- export declare function observabilify<T>(value: T): Observablefied<T>;
package/public-api.d.ts DELETED
@@ -1,9 +0,0 @@
1
- export * from './lib/services/descope-auth.service';
2
- export * from './lib/services/descope-auth.guard';
3
- export * from './lib/services/descope.interceptor';
4
- export * from './lib/descope-auth.module';
5
- export * from './lib/components/descope/descope.component';
6
- export * from './lib/components/sign-in-flow/sign-in-flow.component';
7
- export * from './lib/components/sign-up-flow/sign-up-flow.component';
8
- export * from './lib/components/sign-up-or-in-flow/sign-up-or-in-flow.component';
9
- export * from './lib/types/types';