@daffodil/auth 0.89.0 → 0.91.0

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.
@@ -8,6 +8,7 @@ import { DaffAuthServiceInterface, DaffLoginServiceInterface, DaffRegisterServic
8
8
  import { DaffAuthToken, DaffLoginInfo, DaffAccountRegistration, DaffAuthStorageService } from '@daffodil/auth';
9
9
  import { DaffQueuedApollo, DaffApolloLinkGenerator } from '@daffodil/core/graphql';
10
10
  import { ApolloLink } from '@apollo/client/core';
11
+ import { MagentoDriverFeature } from '@daffodil/driver/magento';
11
12
 
12
13
  declare class DaffAuthMagentoDriverModule {
13
14
  static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule>;
@@ -71,6 +72,8 @@ declare class DaffMagentoRegisterService implements DaffRegisterServiceInterface
71
72
  static ɵprov: i0.ɵɵInjectableDeclaration<DaffMagentoRegisterService>;
72
73
  }
73
74
 
75
+ declare function withMagentoAuthApolloBearerToken(): MagentoDriverFeature;
76
+ declare function provideMagentoAuthApolloBearerToken(): i0.EnvironmentProviders;
74
77
  /**
75
78
  * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
76
79
  *
@@ -128,5 +131,5 @@ interface MagentoResetPasswordResponse {
128
131
  resetPassword: boolean;
129
132
  }
130
133
 
131
- export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation };
134
+ export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, provideMagentoAuthApolloBearerToken, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation, withMagentoAuthApolloBearerToken };
132
135
  export type { MagentoAuth, MagentoCheckTokenResponse, MagentoGenerateTokenResponse, MagentoRegisterResponse, MagentoResetPasswordResponse, MagentoRevokeCustomerTokenResponse, MagentoSendResetEmailResponse };
@@ -1,16 +1,18 @@
1
1
  import { CommonModule } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { Injectable, NgModule } from '@angular/core';
3
+ import { Injectable, NgModule, makeEnvironmentProviders, inject } from '@angular/core';
4
4
  import { DaffAuthenticationFailedError, DaffUnauthorizedError, DaffAuthInvalidAPIResponseError, DaffRegistrationFailedError, provideDaffRegisterDriver, provideDaffLoginDriver, provideDaffAuthDriver, provideDaffResetPasswordDriver } from '@daffodil/auth/driver';
5
5
  import * as i1 from 'apollo-angular';
6
6
  import { gql } from 'apollo-angular';
7
7
  import { throwError } from 'rxjs';
8
8
  import { map, catchError, switchMap } from 'rxjs/operators';
9
- import { daffTransformMagentoError } from '@daffodil/driver/magento';
9
+ import { daffTransformMagentoError, makeMagentoDriverFeature } from '@daffodil/driver/magento';
10
10
  import { DaffBadInputError } from '@daffodil/driver';
11
11
  import * as i1$1 from '@daffodil/core/graphql';
12
+ import { provideDaffApolloHeaderProviders } from '@daffodil/core/graphql';
12
13
  import { ApolloLink } from '@apollo/client/core';
13
14
  import * as i1$2 from '@daffodil/auth';
15
+ import { DaffAuthStorageService } from '@daffodil/auth';
14
16
 
15
17
  var MagentoAuthGraphQlErrorCode;
16
18
  (function (MagentoAuthGraphQlErrorCode) {
@@ -318,6 +320,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
318
320
  }]
319
321
  }] });
320
322
 
323
+ function withMagentoAuthApolloBearerToken() {
324
+ return makeMagentoDriverFeature('MagentoAuthApolloBearerToken', [
325
+ provideMagentoAuthApolloBearerToken(),
326
+ ]);
327
+ }
328
+ function provideMagentoAuthApolloBearerToken() {
329
+ return makeEnvironmentProviders([
330
+ provideDaffApolloHeaderProviders(() => {
331
+ const storage = inject(DaffAuthStorageService);
332
+ let token = null;
333
+ try {
334
+ token = storage.getAuthToken();
335
+ }
336
+ catch (e) { }
337
+ return token
338
+ ? {
339
+ authorization: `Bearer ${token}`,
340
+ }
341
+ : {};
342
+ }),
343
+ ]);
344
+ }
321
345
  /**
322
346
  * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.
323
347
  *
@@ -359,5 +383,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
359
383
  * Generated bundle index. Do not edit.
360
384
  */
361
385
 
362
- export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation };
386
+ export { DaffAuthMagentoDriverModule, DaffMagentoAuthService, DaffMagentoAuthTransformerService, DaffMagentoLoginService, DaffMagentoRegisterService, MagentoAuthApolloBearerTokenLinkGenerator, checkTokenQuery, createCustomerMutation, generateTokenMutation, provideMagentoAuthApolloBearerToken, resetPasswordMutation, revokeCustomerTokenMutation, sendPasswordResetEmailMutation, withMagentoAuthApolloBearerToken };
363
387
  //# sourceMappingURL=daffodil-auth-driver-magento.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"daffodil-auth-driver-magento.mjs","sources":["../../../libs/auth/driver/magento/src/errors/codes.ts","../../../libs/auth/driver/magento/src/errors/map.ts","../../../libs/auth/driver/magento/src/errors/transform.ts","../../../libs/auth/driver/magento/src/queries/check-token.ts","../../../libs/auth/driver/magento/src/queries/create-customer.ts","../../../libs/auth/driver/magento/src/queries/generate-token.ts","../../../libs/auth/driver/magento/src/queries/revoke-customer-token.ts","../../../libs/auth/driver/magento/src/queries/send-reset-email.ts","../../../libs/auth/driver/magento/src/queries/reset-password.ts","../../../libs/auth/driver/magento/src/validators/check-token.ts","../../../libs/auth/driver/magento/src/validators/generate-token.ts","../../../libs/auth/driver/magento/src/validators/revoke-token.ts","../../../libs/auth/driver/magento/src/validators/send-reset-email.ts","../../../libs/auth/driver/magento/src/validators/reset-password.ts","../../../libs/auth/driver/magento/src/auth.service.ts","../../../libs/auth/driver/magento/src/transforms/auth-transformer.service.ts","../../../libs/auth/driver/magento/src/login.service.ts","../../../libs/auth/driver/magento/src/register.service.ts","../../../libs/auth/driver/magento/src/reset-password.service.ts","../../../libs/auth/driver/magento/src/auth-driver.module.ts","../../../libs/auth/driver/magento/src/apollo-bearer-token-link-generator.ts","../../../libs/auth/driver/magento/src/daffodil-auth-driver-magento.ts"],"sourcesContent":["export enum MagentoAuthGraphQlErrorCode {\n UNAUTHORIZED = 'graphql-authorization',\n AUTHENTICATION_FAILED = 'graphql-authentication',\n BAD_INPUT = 'graphql-input'\n}\n","import {\n DaffUnauthorizedError,\n DaffAuthenticationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffBadInputError } from '@daffodil/driver';\n\nimport { MagentoAuthGraphQlErrorCode } from './codes';\n\nexport const DaffAuthMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoAuthGraphQlErrorCode.UNAUTHORIZED]: DaffUnauthorizedError,\n [MagentoAuthGraphQlErrorCode.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [MagentoAuthGraphQlErrorCode.BAD_INPUT]: DaffBadInputError,\n};\n","import { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffAuthMagentoErrorMap } from './map';\n\nexport const transformMagentoAuthError = (error: any): Error => daffTransformMagentoError(error, DaffAuthMagentoErrorMap) || new DaffAuthInvalidAPIResponseError(error.message);\n","import { gql } from 'apollo-angular';\n\n\nexport const checkTokenQuery = gql`\n query MagentoCheckToken {\n customer {\n email\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const createCustomerMutation = gql`\n mutation MagentoCreateCustomer(\n $email: String!,\n $password: String!,\n $subscribe: Boolean!,\n $firstname: String!,\n $lastname: String!,\n ) {\n createCustomerV2(input: {\n firstname: $firstname,\n lastname: $lastname,\n email: $email,\n password: $password,\n is_subscribed: $subscribe\n }) {\n customer {\n email\n }\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const generateTokenMutation = gql`\n mutation MagentoGenerateToken($email: String!, $password: String!) {\n generateCustomerToken(\n email: $email,\n password: $password\n ) {\n token\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const revokeCustomerTokenMutation = gql`\n mutation revokeCustomerToken {\n revokeCustomerToken {\n result\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const sendPasswordResetEmailMutation = gql`\n mutation MagentoSendPasswordResetEmail($email: String!) {\n requestPasswordResetEmail(\n email: $email,\n )\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const resetPasswordMutation = gql`\n mutation MagentoResetPassword($email: String!, $password: String!, $token: String!) {\n resetPassword(\n email: $email,\n newPassword: $password\n resetPasswordToken: $token\n )\n }\n`;\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoCheckTokenResponse } from '../queries/public_api';\n\nexport const validateCheckTokenResponse = (response: ApolloQueryResult<MagentoCheckTokenResponse>) => {\n if (response.data.customer.email) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Check token response does not contain a valid customer email.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoGenerateTokenResponse } from '../queries/public_api';\n\nexport const validateGenerateTokenResponse = (response: ApolloQueryResult<MagentoGenerateTokenResponse>) => {\n if (response.data.generateCustomerToken.token) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Generate token response does not contain an auth token.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoRevokeCustomerTokenResponse } from '../queries/public_api';\n\nexport const validateRevokeTokenResponse = (response: ApolloQueryResult<MagentoRevokeCustomerTokenResponse>) => {\n if (response.data.revokeCustomerToken.result) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Revoke token response does not contain a successful result.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoSendResetEmailResponse } from '../models/public_api';\n\nexport const validateSendResetEmailResponse = (response: ApolloQueryResult<MagentoSendResetEmailResponse>) => {\n if (response.data.requestPasswordResetEmail) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The reset password email was not sent successfully.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoResetPasswordResponse } from '../models/public_api';\n\nexport const validateResetPasswordResponse = (response: ApolloQueryResult<MagentoResetPasswordResponse>) => {\n if (response.data.resetPassword) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The password was not reset.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n checkTokenQuery,\n MagentoCheckTokenResponse,\n} from './queries/public_api';\nimport { validateCheckTokenResponse } from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthService implements DaffAuthServiceInterface {\n constructor(private apollo: Apollo) {}\n\n check(): Observable<void> {\n return this.apollo.query<MagentoCheckTokenResponse>({\n query: checkTokenQuery,\n fetchPolicy: 'no-cache',\n }).pipe(\n map(validateCheckTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffAuthToken } from '@daffodil/auth';\n\nimport { MagentoAuth } from '../models/response/auth';\n\n/**\n * Transforms magento auths into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthTransformerService {\n\n /**\n * Transforms the magento AuthNode from the magento auth query into a DaffAuthToken.\n *\n * @param auth the auth from a magento auth query.\n */\n transform(auth: MagentoAuth): DaffAuthToken {\n return {\n token: auth.token,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n MagentoRevokeCustomerTokenResponse,\n MagentoGenerateTokenResponse,\n generateTokenMutation,\n revokeCustomerTokenMutation,\n} from './queries/public_api';\nimport { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';\nimport {\n validateRevokeTokenResponse,\n validateGenerateTokenResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoLoginService implements DaffLoginServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n public authTransformer: DaffMagentoAuthTransformerService,\n ) {}\n\n login({ email, password }: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.apollo.mutate<MagentoGenerateTokenResponse>({\n mutation: generateTokenMutation,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateGenerateTokenResponse),\n map(res => this.authTransformer.transform(res.data.generateCustomerToken)),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n logout() {\n return this.apollo.mutate<MagentoRevokeCustomerTokenResponse>({ mutation: revokeCustomerTokenMutation }).pipe(\n map(validateRevokeTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n DaffRegisterServiceInterface,\n DaffRegistrationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport { MagentoRegisterResponse } from './models/public_api';\nimport { createCustomerMutation } from './queries/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly({ email, password, subscribe, firstName, lastName }: DaffAccountRegistration): Observable<void> {\n return this.apollo.mutate<MagentoRegisterResponse>({\n mutation: createCustomerMutation,\n variables: {\n email,\n password,\n firstname: firstName || 'temp',\n lastname: lastName || 'temp',\n subscribe,\n },\n }).pipe(\n map((resp) => {\n if (!resp.data.createCustomerV2.customer.email) {\n throw new DaffRegistrationFailedError(`The account for email ${email} was not successful.`);\n }\n\n return;\n }),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport {\n MagentoResetPasswordResponse,\n MagentoSendResetEmailResponse,\n} from './models/public_api';\nimport {\n resetPasswordMutation,\n sendPasswordResetEmailMutation,\n} from './queries/public_api';\nimport {\n validateResetPasswordResponse,\n validateSendResetEmailResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly({ email, password, token }: DaffAuthResetPasswordInfo): Observable<void> {\n return this.apollo.mutate<MagentoResetPasswordResponse>({\n mutation: resetPasswordMutation,\n variables: {\n email,\n password,\n token,\n },\n }).pipe(\n map(validateResetPasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.apollo.mutate<MagentoSendResetEmailResponse>({\n mutation: sendPasswordResetEmailMutation,\n variables: {\n email,\n },\n }).pipe(\n map(validateSendResetEmailResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffRegisterDriver,\n provideDaffLoginDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffMagentoAuthService } from './auth.service';\nimport { DaffMagentoLoginService } from './login.service';\nimport { DaffMagentoRegisterService } from './register.service';\nimport { DaffMagentoResetPasswordService } from './reset-password.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule> {\n return {\n ngModule: DaffAuthMagentoDriverModule,\n providers: [\n provideDaffRegisterDriver(DaffMagentoRegisterService),\n provideDaffLoginDriver(DaffMagentoLoginService),\n provideDaffAuthDriver(DaffMagentoAuthService),\n provideDaffResetPasswordDriver(DaffMagentoResetPasswordService),\n ],\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport { DaffApolloLinkGenerator } from '@daffodil/core/graphql';\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoAuthApolloBearerTokenLinkGenerator implements DaffApolloLinkGenerator {\n constructor(\n private storage: DaffAuthStorageService,\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n let token = null;\n\n try {\n token = this.storage.getAuthToken();\n } catch(e){}\n\n if (token) {\n operation.setContext({\n headers: {\n ...operation.getContext().headers,\n authorization: `Bearer ${token}`,\n },\n });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffMagentoAuthTransformerService","i2.DaffMagentoLoginService"],"mappings":";;;;;;;;;;;;;;AAAA,IAAY,2BAIX;AAJD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,uBAAsC;AACtC,IAAA,2BAAA,CAAA,uBAAA,CAAA,GAAA,wBAAgD;AAChD,IAAA,2BAAA,CAAA,WAAA,CAAA,GAAA,eAA2B;AAC7B,CAAC,EAJW,2BAA2B,KAA3B,2BAA2B,GAAA,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,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAFxC,MAAM,EAAA,CAAA,CAAA;;2FAEP,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAHrD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"daffodil-auth-driver-magento.mjs","sources":["../../../libs/auth/driver/magento/src/errors/codes.ts","../../../libs/auth/driver/magento/src/errors/map.ts","../../../libs/auth/driver/magento/src/errors/transform.ts","../../../libs/auth/driver/magento/src/queries/check-token.ts","../../../libs/auth/driver/magento/src/queries/create-customer.ts","../../../libs/auth/driver/magento/src/queries/generate-token.ts","../../../libs/auth/driver/magento/src/queries/revoke-customer-token.ts","../../../libs/auth/driver/magento/src/queries/send-reset-email.ts","../../../libs/auth/driver/magento/src/queries/reset-password.ts","../../../libs/auth/driver/magento/src/validators/check-token.ts","../../../libs/auth/driver/magento/src/validators/generate-token.ts","../../../libs/auth/driver/magento/src/validators/revoke-token.ts","../../../libs/auth/driver/magento/src/validators/send-reset-email.ts","../../../libs/auth/driver/magento/src/validators/reset-password.ts","../../../libs/auth/driver/magento/src/auth.service.ts","../../../libs/auth/driver/magento/src/transforms/auth-transformer.service.ts","../../../libs/auth/driver/magento/src/login.service.ts","../../../libs/auth/driver/magento/src/register.service.ts","../../../libs/auth/driver/magento/src/reset-password.service.ts","../../../libs/auth/driver/magento/src/auth-driver.module.ts","../../../libs/auth/driver/magento/src/apollo-bearer-token-link-generator.ts","../../../libs/auth/driver/magento/src/daffodil-auth-driver-magento.ts"],"sourcesContent":["export enum MagentoAuthGraphQlErrorCode {\n UNAUTHORIZED = 'graphql-authorization',\n AUTHENTICATION_FAILED = 'graphql-authentication',\n BAD_INPUT = 'graphql-input'\n}\n","import {\n DaffUnauthorizedError,\n DaffAuthenticationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffErrorCodeMap } from '@daffodil/core';\nimport { DaffBadInputError } from '@daffodil/driver';\n\nimport { MagentoAuthGraphQlErrorCode } from './codes';\n\nexport const DaffAuthMagentoErrorMap: DaffErrorCodeMap = {\n [MagentoAuthGraphQlErrorCode.UNAUTHORIZED]: DaffUnauthorizedError,\n [MagentoAuthGraphQlErrorCode.AUTHENTICATION_FAILED]: DaffAuthenticationFailedError,\n [MagentoAuthGraphQlErrorCode.BAD_INPUT]: DaffBadInputError,\n};\n","import { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\nimport { daffTransformMagentoError } from '@daffodil/driver/magento';\n\nimport { DaffAuthMagentoErrorMap } from './map';\n\nexport const transformMagentoAuthError = (error: any): Error => daffTransformMagentoError(error, DaffAuthMagentoErrorMap) || new DaffAuthInvalidAPIResponseError(error.message);\n","import { gql } from 'apollo-angular';\n\n\nexport const checkTokenQuery = gql`\n query MagentoCheckToken {\n customer {\n email\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const createCustomerMutation = gql`\n mutation MagentoCreateCustomer(\n $email: String!,\n $password: String!,\n $subscribe: Boolean!,\n $firstname: String!,\n $lastname: String!,\n ) {\n createCustomerV2(input: {\n firstname: $firstname,\n lastname: $lastname,\n email: $email,\n password: $password,\n is_subscribed: $subscribe\n }) {\n customer {\n email\n }\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const generateTokenMutation = gql`\n mutation MagentoGenerateToken($email: String!, $password: String!) {\n generateCustomerToken(\n email: $email,\n password: $password\n ) {\n token\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const revokeCustomerTokenMutation = gql`\n mutation revokeCustomerToken {\n revokeCustomerToken {\n result\n }\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const sendPasswordResetEmailMutation = gql`\n mutation MagentoSendPasswordResetEmail($email: String!) {\n requestPasswordResetEmail(\n email: $email,\n )\n }\n`;\n","import { gql } from 'apollo-angular';\n\n\nexport const resetPasswordMutation = gql`\n mutation MagentoResetPassword($email: String!, $password: String!, $token: String!) {\n resetPassword(\n email: $email,\n newPassword: $password\n resetPasswordToken: $token\n )\n }\n`;\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoCheckTokenResponse } from '../queries/public_api';\n\nexport const validateCheckTokenResponse = (response: ApolloQueryResult<MagentoCheckTokenResponse>) => {\n if (response.data.customer.email) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Check token response does not contain a valid customer email.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoGenerateTokenResponse } from '../queries/public_api';\n\nexport const validateGenerateTokenResponse = (response: ApolloQueryResult<MagentoGenerateTokenResponse>) => {\n if (response.data.generateCustomerToken.token) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Generate token response does not contain an auth token.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoRevokeCustomerTokenResponse } from '../queries/public_api';\n\nexport const validateRevokeTokenResponse = (response: ApolloQueryResult<MagentoRevokeCustomerTokenResponse>) => {\n if (response.data.revokeCustomerToken.result) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('Revoke token response does not contain a successful result.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoSendResetEmailResponse } from '../models/public_api';\n\nexport const validateSendResetEmailResponse = (response: ApolloQueryResult<MagentoSendResetEmailResponse>) => {\n if (response.data.requestPasswordResetEmail) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The reset password email was not sent successfully.');\n }\n};\n","import { ApolloQueryResult } from '@apollo/client/core';\n\nimport { DaffAuthInvalidAPIResponseError } from '@daffodil/auth/driver';\n\nimport { MagentoResetPasswordResponse } from '../models/public_api';\n\nexport const validateResetPasswordResponse = (response: ApolloQueryResult<MagentoResetPasswordResponse>) => {\n if (response.data.resetPassword) {\n return response;\n } else {\n throw new DaffAuthInvalidAPIResponseError('The password was not reset.');\n }\n};\n","import { Injectable } from '@angular/core';\nimport { Apollo } from 'apollo-angular';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n catchError,\n map,\n} from 'rxjs/operators';\n\nimport { DaffAuthServiceInterface } from '@daffodil/auth/driver';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n checkTokenQuery,\n MagentoCheckTokenResponse,\n} from './queries/public_api';\nimport { validateCheckTokenResponse } from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthService implements DaffAuthServiceInterface {\n constructor(private apollo: Apollo) {}\n\n check(): Observable<void> {\n return this.apollo.query<MagentoCheckTokenResponse>({\n query: checkTokenQuery,\n fetchPolicy: 'no-cache',\n }).pipe(\n map(validateCheckTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\n\nimport { DaffAuthToken } from '@daffodil/auth';\n\nimport { MagentoAuth } from '../models/response/auth';\n\n/**\n * Transforms magento auths into an object usable by daffodil.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoAuthTransformerService {\n\n /**\n * Transforms the magento AuthNode from the magento auth query into a DaffAuthToken.\n *\n * @param auth the auth from a magento auth query.\n */\n transform(auth: MagentoAuth): DaffAuthToken {\n return {\n token: auth.token,\n };\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n} from 'rxjs/operators';\n\nimport {\n DaffLoginInfo,\n DaffAuthToken,\n} from '@daffodil/auth';\nimport { DaffLoginServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport {\n MagentoRevokeCustomerTokenResponse,\n MagentoGenerateTokenResponse,\n generateTokenMutation,\n revokeCustomerTokenMutation,\n} from './queries/public_api';\nimport { DaffMagentoAuthTransformerService } from './transforms/auth-transformer.service';\nimport {\n validateRevokeTokenResponse,\n validateGenerateTokenResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoLoginService implements DaffLoginServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n public authTransformer: DaffMagentoAuthTransformerService,\n ) {}\n\n login({ email, password }: DaffLoginInfo): Observable<DaffAuthToken> {\n return this.apollo.mutate<MagentoGenerateTokenResponse>({\n mutation: generateTokenMutation,\n variables: {\n email,\n password,\n },\n }).pipe(\n map(validateGenerateTokenResponse),\n map(res => this.authTransformer.transform(res.data.generateCustomerToken)),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n logout() {\n return this.apollo.mutate<MagentoRevokeCustomerTokenResponse>({ mutation: revokeCustomerTokenMutation }).pipe(\n map(validateRevokeTokenResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAccountRegistration } from '@daffodil/auth';\nimport {\n DaffRegisterServiceInterface,\n DaffRegistrationFailedError,\n} from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport { MagentoRegisterResponse } from './models/public_api';\nimport { createCustomerMutation } from './queries/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoRegisterService implements DaffRegisterServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n register(registration: DaffAccountRegistration): Observable<string> {\n return this.registerOnly(registration).pipe(\n switchMap(() => this.loginService.login({ email: registration.email, password: registration.password })),\n map(({ token }) => token),\n );\n }\n\n registerOnly({ email, password, subscribe, firstName, lastName }: DaffAccountRegistration): Observable<void> {\n return this.apollo.mutate<MagentoRegisterResponse>({\n mutation: createCustomerMutation,\n variables: {\n email,\n password,\n firstname: firstName || 'temp',\n lastname: lastName || 'temp',\n subscribe,\n },\n }).pipe(\n map((resp) => {\n if (!resp.data.createCustomerV2.customer.email) {\n throw new DaffRegistrationFailedError(`The account for email ${email} was not successful.`);\n }\n\n return;\n }),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {\n Observable,\n throwError,\n} from 'rxjs';\nimport {\n map,\n catchError,\n switchMap,\n} from 'rxjs/operators';\n\nimport { DaffAuthResetPasswordInfo } from '@daffodil/auth';\nimport { DaffResetPasswordServiceInterface } from '@daffodil/auth/driver';\nimport { DaffQueuedApollo } from '@daffodil/core/graphql';\n\nimport { transformMagentoAuthError } from './errors/transform';\nimport { DaffMagentoLoginService } from './login.service';\nimport {\n MagentoResetPasswordResponse,\n MagentoSendResetEmailResponse,\n} from './models/public_api';\nimport {\n resetPasswordMutation,\n sendPasswordResetEmailMutation,\n} from './queries/public_api';\nimport {\n validateResetPasswordResponse,\n validateSendResetEmailResponse,\n} from './validators/public_api';\n\n/**\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class DaffMagentoResetPasswordService implements DaffResetPasswordServiceInterface {\n constructor(\n private apollo: DaffQueuedApollo,\n private loginService: DaffMagentoLoginService,\n ) {}\n\n resetPassword(info: DaffAuthResetPasswordInfo): Observable<string> {\n return this.resetPasswordOnly(info).pipe(\n switchMap(() => this.loginService.login({ email: info.email, password: info.password })),\n map(({ token }) => token),\n );\n }\n\n resetPasswordOnly({ email, password, token }: DaffAuthResetPasswordInfo): Observable<void> {\n return this.apollo.mutate<MagentoResetPasswordResponse>({\n mutation: resetPasswordMutation,\n variables: {\n email,\n password,\n token,\n },\n }).pipe(\n map(validateResetPasswordResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n\n sendResetEmail(email: string): Observable<void> {\n return this.apollo.mutate<MagentoSendResetEmailResponse>({\n mutation: sendPasswordResetEmailMutation,\n variables: {\n email,\n },\n }).pipe(\n map(validateSendResetEmailResponse),\n map(() => undefined),\n catchError(err => throwError(() => transformMagentoAuthError(err))),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport {\n NgModule,\n ModuleWithProviders,\n} from '@angular/core';\n\nimport {\n provideDaffRegisterDriver,\n provideDaffLoginDriver,\n provideDaffAuthDriver,\n provideDaffResetPasswordDriver,\n} from '@daffodil/auth/driver';\n\nimport { DaffMagentoAuthService } from './auth.service';\nimport { DaffMagentoLoginService } from './login.service';\nimport { DaffMagentoRegisterService } from './register.service';\nimport { DaffMagentoResetPasswordService } from './reset-password.service';\n\n@NgModule({\n imports: [\n CommonModule,\n ],\n})\nexport class DaffAuthMagentoDriverModule {\n static forRoot(): ModuleWithProviders<DaffAuthMagentoDriverModule> {\n return {\n ngModule: DaffAuthMagentoDriverModule,\n providers: [\n provideDaffRegisterDriver(DaffMagentoRegisterService),\n provideDaffLoginDriver(DaffMagentoLoginService),\n provideDaffAuthDriver(DaffMagentoAuthService),\n provideDaffResetPasswordDriver(DaffMagentoResetPasswordService),\n ],\n };\n }\n}\n","import {\n inject,\n Injectable,\n makeEnvironmentProviders,\n} from '@angular/core';\nimport { ApolloLink } from '@apollo/client/core';\n\nimport { DaffAuthStorageService } from '@daffodil/auth';\nimport {\n DaffApolloLinkGenerator,\n provideDaffApolloHeaderProviders,\n} from '@daffodil/core/graphql';\nimport {\n makeMagentoDriverFeature,\n MagentoDriverFeature,\n} from '@daffodil/driver/magento';\n\nexport function withMagentoAuthApolloBearerToken(): MagentoDriverFeature {\n return makeMagentoDriverFeature('MagentoAuthApolloBearerToken', [\n provideMagentoAuthApolloBearerToken(),\n ]);\n}\n\nexport function provideMagentoAuthApolloBearerToken() {\n return makeEnvironmentProviders([\n provideDaffApolloHeaderProviders(() => {\n const storage = inject(DaffAuthStorageService);\n let token = null;\n\n try {\n token = storage.getAuthToken();\n } catch(e){}\n\n return token\n ? {\n authorization: `Bearer ${token}`,\n }\n : {};\n }),\n ]);\n}\n\n/**\n * A service that will convert cacheable apollo operations into a format that Magento will understand as cacheable.\n *\n * @inheritdoc\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class MagentoAuthApolloBearerTokenLinkGenerator implements DaffApolloLinkGenerator {\n constructor(\n private storage: DaffAuthStorageService,\n ) {}\n\n getLink(): ApolloLink {\n return new ApolloLink((operation, forward) => {\n let token = null;\n\n try {\n token = this.storage.getAuthToken();\n } catch(e){}\n\n if (token) {\n operation.setContext({\n headers: {\n ...operation.getContext().headers,\n authorization: `Bearer ${token}`,\n },\n });\n }\n return forward(operation);\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2.DaffMagentoAuthTransformerService","i2.DaffMagentoLoginService"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAY,2BAIX;AAJD,CAAA,UAAY,2BAA2B,EAAA;AACrC,IAAA,2BAAA,CAAA,cAAA,CAAA,GAAA,uBAAsC;AACtC,IAAA,2BAAA,CAAA,uBAAA,CAAA,GAAA,wBAAgD;AAChD,IAAA,2BAAA,CAAA,WAAA,CAAA,GAAA,eAA2B;AAC7B,CAAC,EAJW,2BAA2B,KAA3B,2BA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CAAC,SAAS,EAAE,OAAO,KAAI;YAC3C,IAAI,KAAK,GAAG,IAAI;AAEhB,YAAA,IAAI;AACF,gBAAA,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;YACrC;AAAE,YAAA,OAAM,CAAC,EAAC,EAAC;YAEX,IAAI,KAAK,EAAE;gBACT,SAAS,CAAC,UAAU,CAAC;AACnB,oBAAA,OAAO,EAAE;AACP,wBAAA,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC,OAAO;wBACjC,aAAa,EAAE,CAAA,OAAA,EAAU,KAAK,CAAA,CAAE;AACjC,qBAAA;AACF,iBAAA,CAAC;YACJ;AACA,YAAA,OAAO,OAAO,CAAC,SAAS,CAAC;AAC3B,QAAA,CAAC,CAAC;IACJ;iIAvBW,yCAAyC,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAF,IAAA,CAAA,sBAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAzC,uBAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,yCAAyC,cAFxC,MAAM,EAAA,CAAA,CAAA;;2FAEP,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBAHrD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACjDD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@daffodil/auth","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/auth"]}}},"version":"0.89.0","description":"Reducers, State, Selectors, and Drivers for logging in and registering users.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"publishConfig":{"directory":"../../dist/auth"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"^20.0.0","@angular/core":"^20.0.0","@daffodil/core":"0.89.0","@ngrx/store":"^20.0.0","rxjs":"7.8.1"},"optionalDependencies":{"@daffodil/driver":"0.89.0"},"module":"fesm2022/daffodil-auth.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-auth.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-auth-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-auth-routing.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-auth-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-auth-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-auth-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-auth-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-auth-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-auth-state-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.3.0"}}
1
+ {"name":"@daffodil/auth","nx":{"targets":{"build":{"outputs":["{workspaceRoot}/dist/auth"]}}},"version":"0.91.0","description":"Reducers, State, Selectors, and Drivers for logging in and registering users.","repository":{"type":"git","url":"https://github.com/graycoreio/daffodil"},"author":"Graycore LLC","license":"MIT","bugs":{"url":"https://github.com/graycoreio/daffodil/issues"},"publishConfig":{"directory":"../../dist/auth"},"homepage":"https://github.com/graycoreio/daffodil","peerDependencies":{"@angular/common":"^20.0.0","@angular/core":"^20.0.0","@daffodil/core":"0.91.0","@ngrx/store":"^20.0.0","rxjs":"^7.0.0"},"optionalDependencies":{"@daffodil/driver":"0.91.0"},"module":"fesm2022/daffodil-auth.mjs","typings":"index.d.ts","exports":{"./package.json":{"default":"./package.json"},".":{"types":"./index.d.ts","default":"./fesm2022/daffodil-auth.mjs"},"./driver":{"types":"./driver/index.d.ts","default":"./fesm2022/daffodil-auth-driver.mjs"},"./routing":{"types":"./routing/index.d.ts","default":"./fesm2022/daffodil-auth-routing.mjs"},"./state":{"types":"./state/index.d.ts","default":"./fesm2022/daffodil-auth-state.mjs"},"./testing":{"types":"./testing/index.d.ts","default":"./fesm2022/daffodil-auth-testing.mjs"},"./driver/in-memory":{"types":"./driver/in-memory/index.d.ts","default":"./fesm2022/daffodil-auth-driver-in-memory.mjs"},"./driver/magento":{"types":"./driver/magento/index.d.ts","default":"./fesm2022/daffodil-auth-driver-magento.mjs"},"./driver/testing":{"types":"./driver/testing/index.d.ts","default":"./fesm2022/daffodil-auth-driver-testing.mjs"},"./state/testing":{"types":"./state/testing/index.d.ts","default":"./fesm2022/daffodil-auth-state-testing.mjs"}},"sideEffects":false,"dependencies":{"tslib":"^2.6.2"}}