-
Notifications
You must be signed in to change notification settings - Fork 36
Description
When using the ual-reactjs-renderer within an application that uses a minification build process, the names of the authenticators are getting mangled and corrupting the local storage value for UALLoggedInAuthType. The value saved in local storage ends up being the minified value (like n) and causes session persistence to break.
This is happening because it's currently using the constructor value which seems to be a valid target for mangling:
| window.localStorage.setItem('UALLoggedInAuthType', authenticator.constructor.name) |
I discovered this bug while debugging why session persistence wasn't functioning within eoscostarica/eos-rate. This is a react-scripts application, which has built-in minification and mangling. If you log in using any authenticator on eosrate.io, you'll see the local storage value of UALLoggedInAuthType being set improperly and the session won't persist.
Perhaps authenticators need to implement a string value of their name which can be used, as opposed to using the constructor's name? I don't know the appropriate solution, but figured I'd raise the issue.