The JWT submitted from our client app to Express server is malformed. When I paste it into the debugger at jwt.io, the payload is empty because the first dot-separation is a double dot. The token is 490 chars total.
~header~..~signature? but there's another '.' character 16 chars in~
The client app uses Vue 2 and Typescript. Two examples used to develop the Auth0 wrapper are:
Secondarily from another page for Typescript types.
From another question here, I found others have said to add an audience. I would link to it but the community guidelines have me limited.
They weren’t specific as to where to add the audience. So, we tried to add audience to two different methods with no change to the resulting token. Methods below are both from the @auth0/auth0-spa-js library.
Options fed into createAuth0Client() look like this:
Hey @kristen-s no problem, happy to help where I can!
That’s interesting you’re still having an issue with the token being malformed, I don’t have any other ideas off the top of my head
Have you had a chance to walk through our Vue samples? In particular, I’d be curious if you were to work through the bit regarding calling an API in particular, and compare that against your own code/environment. The calling an API sample is from the quickstart I linked previously.
I went through that reference, and didn’t find any new information there specifically.
However, I did find my issue as I was double-checking everything. I had initially expected the environment variable for audience to only be needed on the express server side. So I did not prepend the variable name with ‘VUE_APP_’. That turned out to be my problem, as there was no value for my audience variable. It works now!
Hopefully this can help others who have a similar Vue setup.