-
Notifications
You must be signed in to change notification settings - Fork 15
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
Unable to access pending_authentication_token
in error response
#263
Comments
Hi there, thanks for the report. We're looking into this and will report back soon. |
This should now be fixed in v5.0.0! |
Hello there, It's not fixed. When you use the method authenticate_with_password and you get an error code email_verification_required, a WorkOS::APIError exception is raised and this exception doesn't contain the needed data to continue the flow (pending_authentication_token and email_verification_id) @PaulAsjes Maybe you could re-open this issue? |
Hi, I am having the same issue. It is not yet fixed. Could you please re-open? Also, noting that the error response code |
I'm currently using a fork of the SDK and added a one-line hack to handle the 403 like a 400 in case this may help others move forward with their integration: |
Sorry for the delay here, re-opening so we can fix this. |
Hi there!
We are testing out not-so-happy paths in our authentication flow, and found an issue with the password auth flow: https://workos.com/docs/reference/user-management/authentication/password
When the user's email is not verified, we expect to receive a
email_verification_required
error. However, thehandle_error_response
method in the WorkOS client doesn't pass along thecode
orpending_authentication_token
fields to the defaultAPIError
class:workos-ruby/lib/workos/client.rb
Lines 169 to 173 in 68133ff
Could y'all make it so the
else
case here passes along the code and original error response if available?Our workaround for now is to drop down to using the REST API via Faraday
The text was updated successfully, but these errors were encountered: