Conversation
| }; | ||
| } | ||
|
|
||
| return opt as MfaOption; |
There was a problem hiding this comment.
Isn't opt already MfaOption here?
There was a problem hiding this comment.
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.
would using satisfies MfaOption work here to coerce it w/out asserting?
There was a problem hiding this comment.
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.
import { MfaOption as SomeOtherMfaOption }
a190b68 to
7ae2721
Compare
7ae2721 to
e0ee68e
Compare
e0ee68e to
9755a70
Compare
2704ebc to
916e0fe
Compare
|
friendly ping @ryanclark @kiosion |
* Unify mfa types. * Move DeviceUsage to mfa/types. * Refactor mfa options and move to services/mfa. * Lint fix. * Fix mfa challenge json. * Add MFA Option constants. * Fix lint; Fix test. * Address comments. * Add license.
Changes:
web/packages/teleport/src/services/mfaauth2faTypePrerequisite for SSO MFA changes (TODO).
TODO: Follow up PRs to remove remaining uses of
createMfaOptions.