Skip to content
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

Missing identity in token when not string #438

Closed
phillip055 opened this issue Apr 4, 2019 · 1 comment · Fixed by #484
Closed

Missing identity in token when not string #438

phillip055 opened this issue Apr 4, 2019 · 1 comment · Fixed by #484
Labels
difficulty: easy fix is easy in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap

Comments

@phillip055
Copy link

Note: These issues are for bugs and feature requests for the helper libraries.
If you need help or support, please email help@twilio.com and one of our experts
will assist you!

3.29

Code Snippet

function getTwilioToken(some_id) {
  const token = new AccessToken(
    TWILIO_ACCOUNT_SID,
    TWILIO_API_KEY,
    TWILIO_API_SECRET, {
      identity: `${some_id}`
    }
  );
  const chatGrant = new ChatGrant({
    serviceSid: TWILIO_CHAT_SERVICE_SID
  });
  token.addGrant(chatGrant);
  return token;
}

Steps to Reproduce

  1. Send in an int

Feature Request

We should handle/throw error, if the identity is integer or not string. Currently, it produces token but missing the identity field.

@childish-sambino childish-sambino added the type: twilio enhancement feature request on Twilio's roadmap label Jun 21, 2019
@childish-sambino
Copy link
Contributor

Interesting. Keeping open for backlog purposes.

@childish-sambino childish-sambino added difficulty: easy fix is easy in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap and removed type: twilio enhancement feature request on Twilio's roadmap labels Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: easy fix is easy in difficulty status: help wanted requesting help from the community type: community enhancement feature request not on Twilio's roadmap
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants