-
Notifications
You must be signed in to change notification settings - Fork 493
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
Adding legacy error handling for co/auth endpoint #685
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,7 +166,9 @@ describe('auth0.WebAuth.crossOriginAuthentication', function() { | |
error_description: 'a huge error string' | ||
}, | ||
code: 'any error', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be a machine_name without spaces |
||
description: 'a huge error string' | ||
description: 'a huge error string', | ||
error: 'any error', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be a machine_name without spaces There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. doesn't really matter for the tests though.. |
||
error_description: 'a huge error string' | ||
}); | ||
done(); | ||
} | ||
|
@@ -320,7 +322,9 @@ describe('auth0.WebAuth.crossOriginAuthentication', function() { | |
error_description: 'a super big error message description' | ||
}, | ||
code: 'any_error', | ||
description: 'a super big error message description' | ||
description: 'a super big error message description', | ||
error: 'any_error', | ||
error_description: 'a super big error message description' | ||
}); | ||
expect(_this.webAuthSpy.authorize.called).to.be.eql(false); | ||
done(); | ||
|
@@ -359,7 +363,9 @@ describe('auth0.WebAuth.crossOriginAuthentication', function() { | |
error_description: '{"some":"error"}' | ||
}, | ||
code: 'request_error', | ||
description: '{"some":"error"}' | ||
description: '{"some":"error"}', | ||
error: 'request_error', | ||
error_description: '{"some":"error"}' | ||
}); | ||
expect(_this.webAuthSpy.authorize.called).to.be.eql(false); | ||
done(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that it's possible for
errObj.code
!==errObj.error
... is that intended? Maybe this should fall after whereerr.code
anderrObj.description
are set and set them as equal?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. pushed a change