-
Notifications
You must be signed in to change notification settings - Fork 531
feat!: Making AccessToken Identity required #875
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
Conversation
@@ -359,7 +359,9 @@ export default class AccessToken implements AccessTokenOptions { | |||
if (!secret) { | |||
throw new Error("secret is required"); | |||
} | |||
options = options || {}; | |||
if (!options || !options.identity) { |
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.
Is this first !-check needed?
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.
Good catch, removed.
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.
Actually this breaks if options is undefined. https://github.com/twilio/twilio-node/actions/runs/3857410255/jobs/6574774047
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.
Ah, I see. Or simply !options?.identity
c5960c6
to
fc82d45
Compare
SonarCloud Quality Gate failed. |
Fixes #595 |
JIRA: DI-2445
Making Identity required in the AccessToken constructor.