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

Right-hand side of 'instanceof' is not an object for token.toJwt() (next.js) #1015

Open
MarkovskiyKonstantin opened this issue Apr 4, 2024 · 0 comments

Comments

@MarkovskiyKonstantin
Copy link

Issue Summary

When I create an access token and add it to jwt I get a error Right-hand side of 'instanceof' is not an object for next.js app
image

Steps to Reproduce

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

Code Snippet

    const AccessToken = Twilio.jwt.AccessToken;

    const VoiceGrant = AccessToken.VoiceGrant;
    
    const token = new AccessToken(accountSid, apiKey, apiKeySecret, {identity});

    const voiceGrant = new VoiceGrant({
      incomingAllow: true, // Optional: add to allow incoming calls
      outgoingApplicationSid: accountSid,
    });

   token.addGrant(voiceGrant);

    console.log('### token', token.toJwt());

    

Technical details:

"twilio": "4.23.0",
node version: v20.9.0
"next": "13.3.2",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant