-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Hey, I'm using WorkOS MFA in my customer project & utilise Ruby gem. Everything works as expected but I was able to find one confusing response:
When running a challenge_factor request I can see an attribute code: nil for WorkOS::Challenge in response (and it returns nil for this attribute for any auth_factor_id), example:
irb(main):003> auth_factor_id = Member.find(2).mfa_sms_auth_factor_id
=> "auth_factor_01J50D363JX20ZVRZE2M2P****"
irb(main):004> challenge = WorkOS::MFA.challenge_factor(authentication_factor_id: auth_factor_id)
=>
#<WorkOS::Challenge:0x00000001223d0248
...
irb(main):005> challenge
=>
#<WorkOS::Challenge:0x00000001223d0248
@authentication_factor_id="auth_factor_01J50D363JX20ZVRZE2M2P****",
@code=nil,
@created_at="2024-08-12T12:39:09.808Z",
@expires_at="2024-08-12T12:49:09.809Z",
@id="auth_challenge_01J539JZ7MH51DWBTDJ1W6****",
@object="authentication_challenge",
@updated_at="2024-08-12T12:39:09.808Z">
I can see that Code is NOT covered in the Authentication Challenge documentation as well:
https://workos.com/docs/reference/user-management/mfa/authentication-challenge

I would suggest to either remove Code from response or to document it properly.
Metadata
Metadata
Assignees
Labels
No labels