workos-ruby icon indicating copy to clipboard operation
workos-ruby copied to clipboard

Invitation token on authenticate_with_code

Open xantrac opened this issue 1 year ago • 2 comments

Hello,

looks like authenticate_with_code https://workos.com/docs/reference/user-management/authentication/code API supports an invitation_token to authenticate and accept an invitation in one pass.

But the current sdk doesn't supports it https://github.com/workos/workos-ruby/blob/main/lib/workos/user_management.rb#L312

Also there isn't any implementation to accept an invitation, https://github.com/search?q=repo%3Aworkos%2Fworkos-ruby%20accept_&type=code

How currently people is handly accept an invite in Ruby?

xantrac avatar Dec 22 '24 01:12 xantrac

this is returned when I tried to implement the attribute myself

WorkOS::UnprocessableEntityError (Status 422, `invite_token` cannot be specified for an AuthKit authorization code. - request ID: 4c8df857-2567-4a10-861d-f7d3ffd5077e):

xantrac avatar Dec 22 '24 02:12 xantrac

@xantrac Maybe the problem is a typo? The error complains about invite_token when the docs specify invitation_token

semanticart avatar Dec 24 '24 15:12 semanticart