Unable to recieve JWT even though audience is API

All I want to do is for my frontend react app to send a request to my backend express server which then can do actions such as set a users metadata. My plan was to simply send over to my backend the user_id and then do validation of permissions there and handle stuff such as api management tokens. But I was that to get the user info I need to get a regular jwt and not an opaque token so I added this authorizationParams table.

But now anyytime I make a request I get http 400 from the function call, if I remove the params table though the request is successful and returns the opaque token.

      if (isAuthenticated) { 

        try {
          const token = await getAccessTokenSilently({
            authorizationParams: {
              audience: 'https://dev-whyqk634rvf1658i.us.auth0.com/api/v2/',
            },
          })

          console.log(token)

Hi @jakebball11,

I believe this is because you are using the Management API as your audience! I responded to your other post here: Jwt malformed even though its correct in the request - #5 by marybeth.hunter

Please let me know implementing that solution goes!

Thanks,

Mary Beth

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.