formatError currently will return AuthApiError with xhr property set to TypeError object.
generateIdxAction will try to parse xhr as JSON and will trigger error SyntaxError: "undefined" is not valid JSON
You can reproduce with SIW playground with mock authenticator-enroll-select-authenticator-with-skip having incorrect url http://localhost:3000:1802/idp/idx/cancel. Clicking on Back to sign in will trigger error SyntaxError: "undefined" is not valid JSON instead of OAuthError: Failed to execute 'fetch' on 'Window': Failed to parse URL from http://localhost:3000:1802/idp/idx/cancel
fetch
can throw exceptions: https://developer.mozilla.org/en-US/docs/Web/API/fetch#exceptionsformatError currently will return
AuthApiError
withxhr
property set toTypeError
object. generateIdxAction will try to parsexhr
as JSON and will trigger errorSyntaxError: "undefined" is not valid JSON
You can reproduce with SIW playground with mock authenticator-enroll-select-authenticator-with-skip having incorrect url
http://localhost:3000:1802/idp/idx/cancel
. Clicking onBack to sign in
will trigger errorSyntaxError: "undefined" is not valid JSON
instead ofOAuthError: Failed to execute 'fetch' on 'Window': Failed to parse URL from http://localhost:3000:1802/idp/idx/cancel
Issue for SIW: OKTA-668419