-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Add ha-mfa-modules-card and setup flow #1590
Conversation
|
||
disconnectedCallback() { | ||
super.disconnectedCallback(); | ||
if (this._unsubEvents) this._unsubEvents(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not being set
const user = await this.hass.callWS({ | ||
type: 'auth/current_user', | ||
}); | ||
this.mfaModules = user.mfa_modules; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a property that is passed in. So you will need to tell the hass
object to update the user by firing an event. Add support for this event here
|
||
async _refreshCurrentUser() { | ||
this.fire('hass-refresh-current-user'); | ||
// const user = await this.hass.callWS({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove commented code.
}); | ||
} | ||
|
||
async _refreshCurrentUser() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't have to be async.
Need wait home-assistant/core#16141 merged
Allow user manage enable/disable multi-factor auth module in his profile page