New error in 3.5.x : "Couldn't find JSON Web Token"

Wappler Version : 3.5.4
Operating System : Windows 10
Server Model: NodeJS
Database Type: PostgreSQL
Hosting Type: Docker

Expected behavior

When following instructions on using the JWT security and Google oAuth /Service Account you should not get any errors.

A couple of weeks ago, after the JWT feature was released, i tested it out with a google project set up and one of my Service Accounts. The API worked and the JWT authorization was successful

Actual behavior

I get this error when trying to run the API action file. This error occurs if I use the new Global JWT signing / oauth OR if i use it in the original way with JWT steps inside the API file in server connect

"status":"500","message":"Couldn't find JSON Web Token 

....whole bunch of hashed data...

at App.getJSONWebToken (/opt/node_app/lib/core/app.js:297:15)\n    
at OAuth2.init (/opt/node_app/lib/oauth/index.js:37:40)\n    
t App.setOAuthProvider (/opt/node_app/lib/core/app.js:177:32)\n    
at App.getOAuthProvider (/opt/node_app/lib/core/app.js:193:31)\n    
at App.send (/opt/node_app/lib/modules/api.js:56:41)\n    
at App._exec (/opt/node_app/lib/core/app.js:386:57)\n    
at App._exec (/opt/node_app/lib/core/app.js:357:28)\n    
at processTicksAndRejections (internal/process/task_queues.js:97:5)\n    
at async App.exec (/opt/node_app/lib/core/app.js:328:9)\n    
at async App.define (/opt/node_app/lib/core/app.js:318:9)"}
  • Detail a step by step guide to reproduce the issue
  • A screenshot or short video indicating the problem
  • A copy of your code would help. Include: JS, HTML.
  • Test your steps on a clean page to see if you still have an issue
  1. Create a new JWT step
  2. Create a new oAuth step for a Google Service Account
  3. Try to run a simple API using the authorization above

Hey @patrick, have you been able to see if this is actually a bug or something on my end I can troubleshoot?

Sorry, didn’t have time to look at it yet. Will try to make some time for it.

Was able to reproduce it, try the following update, unzip in lib/core.

app.zip (3.4 KB)

Thanks @patrick. Much appreciated as I know you guys must be pretty busy at the moment. This did work, at least for ‘local’ JWT built into the server action. I haven’t tested with a global but I’m sure that will be fine.