Skip to content

Add ha-mfa-modules-card and setup flow#1590

Merged
balloob merged 3 commits intohome-assistant:masterfrom
awarecan:profile-mfa
Aug 24, 2018
Merged

Add ha-mfa-modules-card and setup flow#1590
balloob merged 3 commits intohome-assistant:masterfrom
awarecan:profile-mfa

Conversation

@awarecan
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants