onSuccess doesn't get called.
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x ] bug report -> please search issues before submitting
- feature request
OS and Version?
Windows 10.
Versions
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / | | | | |/ _
| '__| | | | | | |
/ ___ | | | | (| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/
Angular CLI: 7.1.3 Node: 8.11.1 OS: win32 ia32 Angular: 7.1.3 … animations, cli, common, compiler, compiler-cli, core, forms … http, language-service, platform-browser … platform-browser-dynamic, platform-server, router
Package Version
@angular-devkit/architect 0.11.3 @angular-devkit/build-angular 0.11.3 @angular-devkit/build-optimizer 0.11.3 @angular-devkit/build-webpack 0.11.3 @angular-devkit/core 7.1.3 @angular-devkit/schematics 7.1.3 @angular/cdk 7.1.1 @angular/fire 5.1.1 @angular/flex-layout 7.0.0-beta.19 @angular/material 7.1.1 @ngtools/webpack 7.1.3 @schematics/angular 7.1.3 @schematics/update 0.11.3 rxjs 6.3.3 typescript 3.1.6 webpack 4.23.1
Repro steps
<ngx-auth-firebaseui *ngIf=“thisUser==null” [guestEnabled]=“false” (onSuccess)=“printUser($event)” (onError)=“printError($event)”> </ngx-auth-firebaseui> <ngx-auth-firebaseui-user *ngIf=“thisUser”></ngx-auth-firebaseui-user>
Desired functionality
I would like to see that the onSuccess gets called.
Mention any other details that might be useful
onSuccess doesn’t get called. On the above sample, onSuccess does nothing and onError will send the error object 2 more times to the console. So without the above onError call, error event will show TWICE and WITH the onError call it will show FOUR TIMES on each unsuccessful login attempt.
Please note: this is not the same issue as #138 ‘Progress bar doesn’t stop and onSuccess doesn’t work’, because in my case the progress-bar does stop. Also, the firebase User object gets updated after a successful login.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (2 by maintainers)
Seems that after adding the
toastMessageOnAuthSuccess: false
or eventrue
option solves this problem. Basically, one needs to specify the config parameter when initializing the component.Now onSuccess gets indeed called.
Looks like the line
if (this.config.toastMessageOnAuthSuccess) {
inside src/module/services/auth-process.service.ts:211 is malfunctioning if the config parameter is not specified.Hi Anthony,
Sorry, I had to reopen this as I face the same issue with v2.7.2. OnSuccess not called. Tried the workaround above…but did not help either.
New ticket is #257
Thanks