errors while following github sample for oauth auth code grant type,Getting errors in github sample for OAuth authorization code grant type

robin
New Member

i am Getting errors in github sample for OAuth authorization code grant type

https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/oauth-advanced

on step#3, i am providing the password as apigee123 as instructed there, still i get keep getting error

here's the stack trace

TypeError: org.mozilla.javascript.Undefined@0 is not a function, it is undefined.
at /organization/environment/api/routes/registration.js:117:0
at /organization/environment/api/routes/registration.js:24:0
at handle (/organization/environment/api/node_modules/express/lib/router/layer.js:95:0)
at next (/organization/environment/api/node_modules/express/lib/router/route.js:137:0)
at dispatch (/organization/environment/api/node_modules/express/lib/router/route.js:112:0)
at handle (/organization/environment/api/node_modules/express/lib/router/layer.js:95:0)
at /organization/environment/api/node_modules/express/lib/router/index.js:281:0
at process_params (/organization/environment/api/node_modules/express/lib/router/index.js:335:0)
at next (/organization/environment/api/node_modules/express/lib/router/index.js:275:0)
at /organization/environment/api/node_modules/express/node_modules/body-parser/lib/read.js:130:0
at invokeCallback (/organization/environment/api/node_modules/express/node_modules/raw-body/index.js:224:0)
at done (/organization/environment/api/node_modules/express/node_modules/raw-body/index.js:213:0)
at onEnd (/organization/environment/api/node_modules/express/node_modules/raw-body/index.js:273:0)
at emit (events.js:92:0)
at _stream_readable.js:943:0
at _tickDomainCallback (trireme.js:491:0)
at _tickFromSpinner (trireme.js:422:0)
,

The sample that's provided on github

https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/oauth-advanced

is having issues

I am on step#3 , when i try to register, i get the error even though i am giving the password as apigee123 as instructed in that step.

this is the stack trace

TypeError: org.mozilla.javascript.Undefined@0 is not a function, it is undefined.
at /organization/environment/api/routes/registration.js:117:0
at /organization/environment/api/routes/registration.js:24:0
at handle (/organization/environment/api/node_modules/express/lib/router/layer.js:95:0)
at next (/organization/environment/api/node_modules/express/lib/router/route.js:137:0)
at dispatch (/organization/environment/api/node_modules/express/lib/router/route.js:112:0)
at handle (/organization/environment/api/node_modules/express/lib/router/layer.js:95:0)
at /organization/environment/api/node_modules/express/lib/router/index.js:281:0
at process_params (/organization/environment/api/node_modules/express/lib/router/index.js:335:0)
at next (/organization/environment/api/node_modules/express/lib/router/index.js:275:0)
at /organization/environment/api/node_modules/express/node_modules/body-parser/lib/read.js:130:0
at invokeCallback (/organization/environment/api/node_modules/express/node_modules/raw-body/index.js:224:0)
at done (/organization/environment/api/node_modules/express/node_modules/raw-body/index.js:213:0)
at onEnd (/organization/environment/api/node_modules/express/node_modules/raw-body/index.js:273:0)
at emit (events.js:92:0)
at _stream_readable.js:943:0
at _tickDomainCallback (trireme.js:491:0)
at _tickFromSpinner (trireme.js:422:0)
0 2 109
2 REPLIES 2

I don't recognize the specific problem you're seeing.

Aside from that, I think as of today?, or very soon anyway, Trireme is no longer supported on Apigee. And it seems like that sample depends on trireme.

@Will Witman , any idea on these platform samples?

In the meantime, leofoto, here is an alternative example covering OAuth authorization code grant. It does not rely on trireme.

I'll look into the problem with the oauth-advanced example. In the meantime, please use the alternative sample mentioned above.