-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutoLogin not working with ng build --prod #85
Comments
same issue with me i am using |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to implement Anchor and Wax login with UAL in an angular app. Everything works fine except when I refresh my page UAL is unable to find the logged in user from session. This is happening because 'ual-session-authenticator' is not saved. The value for 'ual-session-authenticator' in localStorage is always null because it is saved by
localStorage.setItem(UALJs.SESSION_AUTHENTICATOR_KEY, authenticator.constructor.name);
in UALJs . And on page refresh when it tries to find the session authenticator it couldnt because it also uses
const sessionAuthenticator = authenticators.find((authenticator) => authenticator.constructor.name === authenticatorName);
This only happens with
ng serve --prod --sourceMap
andng build --prod
. Dev buildng serve
works fine. Angular uglify class names for prod builds.A better way is to use instanceof instead of constructor.name
Angular CLI: 11.0.5
Node: 14.15.0
OS: win32 x64
Angular: 11.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
@angular-devkit/architect 0.1100.5
@angular-devkit/build-angular 0.1100.5
@angular-devkit/core 11.0.5
@angular-devkit/schematics 11.0.5
@schematics/angular 11.0.5
@schematics/update 0.1100.5
rxjs 6.6.3
typescript 4.0.3
The text was updated successfully, but these errors were encountered: