-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
WebUI MFA types refactor #49678
WebUI MFA types refactor #49678
Conversation
}; | ||
} | ||
|
||
return opt as MfaOption; |
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.
Isn't opt
already MfaOption
here?
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.
It's of type services/mfa/MfaOption
but this method needs to return utils/MfaOption
. I'm not sure how to how to make the former a type alias of the latter since they have the same name, so I just did a type cast. Is there another way to make this work?
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.
would using satisfies MfaOption
work here to coerce it w/out asserting?
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.
would using satisfies MfaOption work here to coerce it w/out asserting?
Maybe? But I'm not sure how to import services/mfa/MfaOption
since the name overlaps.
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.
import { MfaOption as SomeOtherMfaOption }
a190b68
to
7ae2721
Compare
7ae2721
to
e0ee68e
Compare
e0ee68e
to
9755a70
Compare
2704ebc
to
916e0fe
Compare
friendly ping @ryanclark @kiosion |
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.
Sorry was OOO
Changes:
web/packages/teleport/src/services/mfa
auth2faType
Prerequisite for SSO MFA changes (TODO).
TODO: Follow up PRs to remove remaining uses of
createMfaOptions
.