Hi Saif/Team,
Thanks for the information and examples. I had created the oauth_config.json as suggested. However, through the serverless app , I’m getting “null” in the access_token tag-‘Authorization’ : ‘Bearer <%= access_token %>’ in the SERVER.js file.
However, when I hit the URL on Chrome Browser/Postman directly, it’s returning the correct response. Can you please suggest how we can resolve this in the FD serverless app?
Few more things, I noticed:
Through the app the URL being created is like this:
https://nor.com.mm/oauth/v1/userAuthorize?scope=read&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A10001%2Fauth%2Fcallback&state=8aaa7b35-15bb-4469-9b7f-e3c6d98d51c4&client_id=4v3etSEN0AsS1irW71XcCCB3QAsUUB8a
whereas it should actually be like this:
https://nor.com.mm/oauth/v1/userAuthorize?client_id=4v3etSEN0AsS1irW71XcCCB3QAsUUB8a&response_type=code&scope=READ
Secondly, When I opened this: http://localhost:10001/custom_configs, I can see the below error:
TokenError
at OAuth2Strategy.parseErrorResponse (C:\new\nvm\v10.18.0\node_modules\fdk\node_modules\passport-oauth2\lib\strategy.js:358:12)
at OAuth2Strategy._createOAuthError (C:\new\nvm\v10.18.0\node_modules\fdk\node_modules\passport-oauth2\lib\strategy.js:405:16)
at C:\new\nvm\v10.18.0\node_modules\fdk\node_modules\passport-oauth2\lib\strategy.js:175:45
at C:\new\nvm\v10.18.0\node_modules\fdk\node_modules\oauth\lib\oauth2.js:191:18
at passBackControl (C:\new\nvm\v10.18.0\node_modules\fdk\node_modules\oauth\lib\oauth2.js:132:9)
at IncomingMessage. (C:\new\nvm\v10.18.0\node_modules\fdk\node_modules\oauth\lib\oauth2.js:157:7)
at IncomingMessage.emit (events.js:203:15)
at endReadableNT (_stream_readable.js:1143:12)
at process._tickCallback (internal/process/next_tick.js:63:19)