UNPKG

@nebular/firebase-auth

Version:
1 lines 29.7 kB
{"version":3,"file":"nebular-firebase-auth.mjs","sources":["../../../src/framework/firebase-auth/strategies/base/firebase-base.strategy.ts","../../../src/framework/firebase-auth/strategies/password/firebase-password-strategy.options.ts","../../../src/framework/firebase-auth/strategies/password/firebase-password.strategy.ts","../../../src/framework/firebase-auth/strategies/base/firebase-identity-provider-strategy.options.ts","../../../src/framework/firebase-auth/strategies/google/firebase-google.strategy.ts","../../../src/framework/firebase-auth/strategies/facebook/firebase-facebook.strategy.ts","../../../src/framework/firebase-auth/strategies/twitter/firebase-twitter.strategy.ts","../../../src/framework/firebase-auth/firebase-auth.module.ts","../../../src/framework/firebase-auth/public_api.ts","../../../src/framework/firebase-auth/nebular-firebase-auth.ts"],"sourcesContent":["/*\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Injectable } from '@angular/core';\nimport { AngularFireAuth } from '@angular/fire/compat/auth';\nimport { Observable, of as observableOf, from } from 'rxjs';\nimport { catchError, map } from 'rxjs/operators';\nimport { NbAuthResult, NbAuthIllegalTokenError, NbAuthStrategy } from '@nebular/auth';\n\nimport firebase from 'firebase/compat/app';\nimport UserCredential = firebase.auth.UserCredential;\n\n@Injectable()\nexport abstract class NbFirebaseBaseStrategy extends NbAuthStrategy {\n constructor(protected afAuth: AngularFireAuth) {\n super();\n }\n\n logout(): Observable<NbAuthResult> {\n const module = 'logout';\n return from(this.afAuth.signOut()).pipe(\n map(() => {\n return new NbAuthResult(\n true,\n null,\n this.getOption(`${module}.redirect.success`),\n [],\n this.getOption(`${module}.defaultMessages`),\n );\n }),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n\n register(data?: any): Observable<NbAuthResult> {\n throw new Error(`'register' is not supported by '${this.constructor.name}', use 'authenticate'.`);\n }\n\n requestPassword(data?: any): Observable<NbAuthResult> {\n throw new Error(`'requestPassword' is not supported by '${this.constructor.name}', use 'authenticate'.`);\n }\n\n resetPassword(data: any = {}): Observable<NbAuthResult> {\n throw new Error(`'resetPassword' is not supported by '${this.constructor.name}', use 'authenticate'.`);\n }\n\n refreshToken(data: any = {}): Observable<NbAuthResult> {\n throw new Error(`'refreshToken' is not supported by '${this.constructor.name}', use 'authenticate'.`);\n }\n\n protected processFailure(error: any, module: string): Observable<NbAuthResult> {\n const errorMessages = [];\n\n if (error instanceof NbAuthIllegalTokenError) {\n errorMessages.push(error.message);\n } else {\n errorMessages.push(this.getOption('errors.getter')(module, error, this.options));\n }\n\n return observableOf(\n new NbAuthResult(false, error, this.getOption(`${module}.redirect.failure`), errorMessages, []),\n );\n }\n\n protected processSuccess(res: UserCredential | null, module: string): Observable<NbAuthResult> {\n return this.afAuth.idToken.pipe(\n map((token) => {\n return new NbAuthResult(\n true,\n res,\n this.getOption(`${module}.redirect.success`),\n [],\n this.getOption('messages.getter')(module, res, this.options),\n this.createToken(token),\n );\n }),\n );\n }\n}\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport {\n getDeepFromObject,\n NbAuthJWTToken,\n NbAuthStrategyOptions,\n NbPasswordStrategyMessage,\n NbPasswordStrategyModule,\n NbStrategyToken,\n} from '@nebular/auth';\n\nexport class NbFirebasePasswordStrategyOptions extends NbAuthStrategyOptions {\n token?: NbStrategyToken = {\n class: NbAuthJWTToken,\n };\n register?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: '/',\n failure: null,\n },\n defaultErrors: ['Something went wrong, please try again.'],\n defaultMessages: ['You have been successfully registered.'],\n };\n login?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: '/',\n failure: null,\n },\n defaultErrors: ['Login/Email combination is not correct, please try again.'],\n defaultMessages: ['You have been successfully logged in.'],\n };\n logout?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: '/',\n failure: null,\n },\n defaultErrors: ['Something went wrong, please try again.'],\n defaultMessages: ['You have been successfully logged out.'],\n };\n refreshToken?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: null,\n failure: null,\n },\n defaultErrors: ['Something went wrong, please try again.'],\n defaultMessages: ['Your token has been successfully refreshed.'],\n };\n requestPassword?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: '/',\n failure: null,\n },\n defaultErrors: ['Something went wrong, please try again.'],\n defaultMessages: ['Reset password instructions have been sent to your email.'],\n };\n resetPassword?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: '/',\n failure: null,\n },\n defaultErrors: ['Something went wrong, please try again.'],\n defaultMessages: ['Your password has been successfully changed.'],\n };\n errors?: NbPasswordStrategyMessage = {\n key: 'message',\n getter: (module: string, res, options: NbFirebasePasswordStrategyOptions) => getDeepFromObject(\n res,\n options.errors.key,\n options[module].defaultErrors,\n ),\n };\n messages?: NbPasswordStrategyMessage = {\n key: 'messages',\n getter: (module: string, res, options: NbFirebasePasswordStrategyOptions) => getDeepFromObject(\n res.body,\n options.messages.key,\n options[module].defaultMessages,\n ),\n };\n}\n\n// eslint-disable-next-line max-len\nexport const firebasePasswordStrategyOptions: NbFirebasePasswordStrategyOptions = new NbFirebasePasswordStrategyOptions();\n","/*\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Injectable } from '@angular/core';\nimport firebase from 'firebase/compat/app';\nimport { Observable, of as observableOf, from } from 'rxjs';\nimport { catchError, map, switchMap, take } from 'rxjs/operators';\nimport { NbAuthStrategyOptions, NbAuthStrategyClass, NbAuthResult } from '@nebular/auth';\n\nimport { NbFirebaseBaseStrategy } from '../base/firebase-base.strategy';\nimport {\n firebasePasswordStrategyOptions,\n NbFirebasePasswordStrategyOptions,\n} from './firebase-password-strategy.options';\n\n@Injectable()\nexport class NbFirebasePasswordStrategy extends NbFirebaseBaseStrategy {\n protected defaultOptions: NbFirebasePasswordStrategyOptions = firebasePasswordStrategyOptions;\n\n static setup(options: NbFirebasePasswordStrategyOptions): [NbAuthStrategyClass, NbAuthStrategyOptions] {\n return [NbFirebasePasswordStrategy, options];\n }\n\n authenticate({ email, password }: any): Observable<NbAuthResult> {\n const module = 'login';\n return from(this.afAuth.signInWithEmailAndPassword(email, password)).pipe(\n switchMap((res) => this.processSuccess(res, module)),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n\n refreshToken(data?: any): Observable<NbAuthResult> {\n const module = 'refreshToken';\n return this.afAuth.authState.pipe(\n take(1),\n switchMap((user) => {\n if (user == null) {\n return observableOf(\n new NbAuthResult(false, null, this.getOption(`${module}.redirect.failure`), [\n \"There is no logged in user so refresh of id token isn't possible\",\n ]),\n );\n }\n return this.refreshIdToken(user, module);\n }),\n );\n }\n\n register({ email, password }: any): Observable<NbAuthResult> {\n const module = 'register';\n return from(this.afAuth.createUserWithEmailAndPassword(email, password)).pipe(\n switchMap((res) => this.processSuccess(res, module)),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n\n requestPassword({ email }: any): Observable<NbAuthResult> {\n const module = 'requestPassword';\n return from(this.afAuth.sendPasswordResetEmail(email)).pipe(\n map(() => {\n return new NbAuthResult(\n true,\n null,\n this.getOption(`${module}.redirect.success`),\n [],\n this.getOption(`${module}.defaultMessages`),\n );\n }),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n\n resetPassword({ code, password }): Observable<NbAuthResult> {\n const module = 'resetPassword';\n return from(this.afAuth.confirmPasswordReset(code, password)).pipe(\n map(() => {\n return new NbAuthResult(\n true,\n null,\n this.getOption(`${module}.redirect.success`),\n [],\n this.getOption(`${module}.defaultMessages`),\n );\n }),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n\n protected updatePassword(user, password, module) {\n return from(user.updatePassword(password)).pipe(\n map((token) => {\n return new NbAuthResult(\n true,\n null,\n this.getOption(`${module}.redirect.success`),\n [],\n this.getOption(`${module}.defaultMessages`),\n this.createToken(token),\n );\n }),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n\n protected refreshIdToken(user: firebase.User, module): Observable<NbAuthResult> {\n return from(user.getIdToken(true)).pipe(\n map((token) => {\n return new NbAuthResult(\n true,\n null,\n this.getOption(`${module}.redirect.success`),\n [],\n this.getOption(`${module}.defaultMessages`),\n this.createToken(token),\n );\n }),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n}\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport {\n NbPasswordStrategyMessage,\n NbPasswordStrategyModule,\n NbAuthJWTToken,\n NbAuthStrategyOptions,\n NbStrategyToken,\n} from '@nebular/auth';\n\nexport class NbFirebaseIdentityProviderStrategyOptions extends NbAuthStrategyOptions {\n token?: NbStrategyToken = {\n class: NbAuthJWTToken,\n };\n logout?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: '/',\n failure: null,\n },\n defaultErrors: ['Something went wrong, please try again.'],\n defaultMessages: ['You have been successfully logged out.'],\n };\n authenticate?: boolean | NbPasswordStrategyModule = {\n redirect: {\n success: '/',\n failure: null,\n },\n defaultErrors: ['Something went wrong, please try again.'],\n defaultMessages: ['You have been successfully authenticated.'],\n };\n errors?: NbPasswordStrategyMessage = {\n key: 'message',\n getter: (module: string, res, options: NbFirebaseIdentityProviderStrategyOptions) => options[module].defaultErrors,\n };\n messages?: NbPasswordStrategyMessage = {\n key: 'message',\n getter: (module: string, res, options: NbFirebaseIdentityProviderStrategyOptions) => {\n return options[module].defaultMessages;\n },\n };\n scopes?: string[] = [];\n customParameters?: { [key: string]: string } = {};\n};\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Injectable } from '@angular/core';\nimport { from, Observable } from 'rxjs';\nimport { catchError, switchMap } from 'rxjs/operators';\nimport { NbAuthStrategyClass, NbAuthResult, NbAuthStrategyOptions } from '@nebular/auth';\n\nimport { NbFirebaseBaseStrategy } from '../base/firebase-base.strategy';\nimport { NbFirebaseIdentityProviderStrategyOptions } from '../base/firebase-identity-provider-strategy.options';\n\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\n\n@Injectable()\nexport class NbFirebaseGoogleStrategy extends NbFirebaseBaseStrategy {\n protected defaultOptions: NbFirebaseIdentityProviderStrategyOptions = new NbFirebaseIdentityProviderStrategyOptions();\n\n static setup(options: NbFirebaseIdentityProviderStrategyOptions): [NbAuthStrategyClass, NbAuthStrategyOptions] {\n return [NbFirebaseGoogleStrategy, options];\n }\n\n authenticate(data?: any): Observable<NbAuthResult> {\n const module = 'authenticate';\n const provider = new firebase.auth.GoogleAuthProvider();\n const scopes = this.getOption('scopes');\n scopes.forEach((scope) => provider.addScope(scope));\n provider.setCustomParameters(this.getOption('customParameters'));\n\n return from(this.afAuth.signInWithPopup(provider)).pipe(\n switchMap((res) => this.processSuccess(res, module)),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n}\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Injectable } from '@angular/core';\nimport { NbAuthResult, NbAuthStrategyClass, NbAuthStrategyOptions } from '@nebular/auth';\nimport { from, Observable } from 'rxjs';\nimport { catchError, switchMap } from 'rxjs/operators';\n\nimport { NbFirebaseBaseStrategy } from '../base/firebase-base.strategy';\nimport { NbFirebaseIdentityProviderStrategyOptions } from '../base/firebase-identity-provider-strategy.options';\n\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\n\n@Injectable()\nexport class NbFirebaseFacebookStrategy extends NbFirebaseBaseStrategy {\n protected defaultOptions: NbFirebaseIdentityProviderStrategyOptions = new NbFirebaseIdentityProviderStrategyOptions();\n\n static setup(options: NbFirebaseIdentityProviderStrategyOptions): [NbAuthStrategyClass, NbAuthStrategyOptions] {\n return [NbFirebaseFacebookStrategy, options];\n }\n\n authenticate(data?: any): Observable<NbAuthResult> {\n const module = 'authenticate';\n const provider = new firebase.auth.FacebookAuthProvider();\n const scopes = this.getOption('scopes');\n scopes.forEach((scope) => provider.addScope(scope));\n provider.setCustomParameters(this.getOption('customParameters'));\n\n return from(this.afAuth.signInWithPopup(provider)).pipe(\n switchMap((res) => this.processSuccess(res, module)),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n}\n","/**\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { Injectable } from '@angular/core';\nimport { Observable, from } from 'rxjs';\nimport { catchError, switchMap } from 'rxjs/operators';\nimport { NbAuthStrategyClass, NbAuthResult, NbAuthStrategyOptions } from '@nebular/auth';\n\nimport { NbFirebaseBaseStrategy } from '../base/firebase-base.strategy';\nimport { NbFirebaseIdentityProviderStrategyOptions } from '../base/firebase-identity-provider-strategy.options';\n\nimport firebase from 'firebase/compat/app';\nimport 'firebase/compat/auth';\n\n@Injectable()\nexport class NbFirebaseTwitteStrategy extends NbFirebaseBaseStrategy {\n protected defaultOptions: NbFirebaseIdentityProviderStrategyOptions = new NbFirebaseIdentityProviderStrategyOptions();\n\n static setup(options: NbFirebaseIdentityProviderStrategyOptions): [NbAuthStrategyClass, NbAuthStrategyOptions] {\n return [NbFirebaseTwitteStrategy, options];\n }\n\n authenticate(data?: any): Observable<NbAuthResult> {\n const module = 'authenticate';\n const provider = new firebase.auth.TwitterAuthProvider();\n provider.setCustomParameters(this.getOption('customParameters'));\n\n return from(this.afAuth.signInWithPopup(provider)).pipe(\n switchMap((res) => this.processSuccess(res, module)),\n catchError((error) => this.processFailure(error, module)),\n );\n }\n}\n","/*\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\n\nimport { NgModule } from '@angular/core';\n\nimport { NbFirebasePasswordStrategy } from './strategies/password/firebase-password.strategy';\nimport { NbFirebaseGoogleStrategy } from './strategies/google/firebase-google.strategy';\nimport { NbFirebaseFacebookStrategy } from './strategies/facebook/firebase-facebook.strategy';\nimport { NbFirebaseTwitteStrategy } from './strategies/twitter/firebase-twitter.strategy';\n\n\n@NgModule({\n providers: [\n NbFirebasePasswordStrategy,\n NbFirebaseGoogleStrategy,\n NbFirebaseFacebookStrategy,\n NbFirebaseTwitteStrategy,\n ],\n})\nexport class NbFirebaseAuthModule { }\n","/*\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\n\nexport * from\t'./strategies/base/firebase-base.strategy';\nexport * from './strategies/password/firebase-password.strategy';\nexport * from './strategies/password/firebase-password-strategy.options';\nexport * from './strategies/base/firebase-identity-provider-strategy.options';\nexport * from './strategies/google/firebase-google.strategy';\nexport * from './strategies/facebook/firebase-facebook.strategy';\nexport * from './strategies/twitter/firebase-twitter.strategy';\nexport * from './firebase-auth.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["observableOf"],"mappings":";;;;;;;;;AAAA;;;;AAIG;AAYG,MAAgB,sBAAuB,SAAQ,cAAc,CAAA;AACjE,IAAA,WAAA,CAAsB,MAAuB,EAAA;AAC3C,QAAA,KAAK,EAAE;QADa,IAAA,CAAA,MAAM,GAAN,MAAM;IAE5B;IAEA,MAAM,GAAA;QACJ,MAAM,MAAM,GAAG,QAAQ;AACvB,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,IAAI,CACrC,GAAG,CAAC,MAAK;YACP,OAAO,IAAI,YAAY,CACrB,IAAI,EACJ,IAAI,EACJ,IAAI,CAAC,SAAS,CAAC,CAAA,EAAG,MAAM,CAAA,iBAAA,CAAmB,CAAC,EAC5C,EAAE,EACF,IAAI,CAAC,SAAS,CAAC,CAAA,EAAG,MAAM,CAAA,gBAAA,CAAkB,CAAC,CAC5C;AACH,QAAA,CAAC,CAAC,EACF,UAAU,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAC1D;IACH;AAEA,IAAA,QAAQ,CAAC,IAAU,EAAA;QACjB,MAAM,IAAI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