Skip to content
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

Merged
merged 3 commits into from
Aug 24, 2018

Conversation

awarecan
Copy link
Contributor

@awarecan awarecan commented Aug 22, 2018

Need wait home-assistant/core#16141 merged

Allow user manage enable/disable multi-factor auth module in his profile page

image


disconnectedCallback() {
super.disconnectedCallback();
if (this._unsubEvents) this._unsubEvents();
Copy link
Member

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;
Copy link
Member

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({
Copy link
Member

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() {
Copy link
Member

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.

@balloob balloob merged commit 7cc3fc7 into home-assistant:master Aug 24, 2018
@ghost ghost removed the in progress label Aug 24, 2018
@awarecan awarecan deleted the profile-mfa branch March 16, 2019 16:44
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants