IBM Cloud App ID' s custom identity flow:InternalOAuthError occurs - ibm-cloud

I use IBM Cloud App ID' and I want to use LinkedIn as a provider.
However, "InternalOAuthError" occurs at the time of app approving.
There is a sample on the IBM Cloud blog.
Sign In Your App Users With Any Identity Provider Using App ID
I tried the sample app along this flow. Login to LinkedIn seems to have succeeded, but the following error occurred when app was approved.
InternalOAuthError: failed to fetch user profile
at _oauth2.get (C:\xxx\AppIdCustomIdentity\node_modules\passport-linkedin-oauth2\lib\oauth2.js:70:23)
at passBackControl (C:\xxx\AppIdCustomIdentity\node_modules\oauth\lib\oauth2.js:132:9)
at IncomingMessage.<anonymous> (C:\xxx\AppIdCustomIdentity\node_modules\oauth\lib\oauth2.js:157:7)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
Please help!!
When I tried this post,"InternalOAuthError" no longer occurs.
But another error has occurred.
Error: Failed to obtain tokens
at Request.request [as _callback] (C:\xxx\AppIdCustomIdentity\node_modules\ibmcloud-appid\lib\token-manager\token-manager.js:118:13)
at Request.self.callback (C:\xxx\AppIdCustomIdentity\node_modules\request\request.js:185:22)
at Request.emit (events.js:182:13)
at Request.<anonymous> (C:\xxx\AppIdCustomIdentity\node_modules\request\request.js:1161:10)
at Request.emit (events.js:182:13)
at IncomingMessage.<anonymous> (C:\xxx\AppIdCustomIdentity\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19)

As suggested in this post (https://stackoverflow.com/a/56329029/10422503), looks like the passport-linkedin-oauth2 library has not been updated for the LinkedIn 2.0 APIs. Try using the fork suggested there

Looking at the stack trace it looks like the exception is coming from passport-linkedin-oauth2 module.
at _oauth2.get (C:\xxx\AppIdCustomIdentity\node_modules\passport-linkedin-oauth2\lib\oauth2.js:70:23)
Googling for InternalOAuthError: failed to fetch user profile +linkedin gives a few options you might want to try.

Related

setuid must be string getting error when trying to deploy my node js app to google cloud platform

I m getting this error when I try to deploy it to google cloud platform.
I m using Redis NODEjs
Error msg:
Unhandled rejection StatusCodeError: 401 - "{\"error\":\"Something strange occurred. Please contact the app owners.\",\"link\":null,\"developer message\":\"No user credentials were provided.\",\"error_code\":8003}"
4:52:44 PM sync.1 | at new StatusCodeError (E:\DOwn\Compressed\multiprocess-master\node_modules\request-promise\lib\errors.js:32:15)
4:52:44 PM sync.1 | at Request.RP$callback [as _callback]

truffle init Error making request. Please check the format of the requested resource

How can I resolve this for truffle#4.0.1?
I am running 'truffle init' in Windows PowerShell as an Admin and I am receiving this error. If I try to go to the url in the browser it gives me I see an ERR_CONNECTION_RESET page.
PS C:\Users\UserName\desktop\Demo> truffle init
Downloading...
Error: Error making request. Please check the format of the requested resource: https://raw.githubusercontent.com/truffle-box/bare-box/master/truffle.js
at Request._callback (C:\Users\zswann\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:311386:23)
at self.callback (C:\Users\zswann\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:283165:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.onRequestError (C:\Users\zswann\AppData\Roaming\npm\node_modules\truffle\build\cli.bundled.js:283857:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:188:7)
at TLSSocket.socketErrorListener (_http_client.js:310:9)
at emitOne (events.js:96:13)
at TLSSocket.emit (events.js:188:7)
I got the same issue and figured out that my browser blocking the URL: https://raw.githubusercontent.com
Once my admin unblock the URL and it's working fine.

ionic2: Uploading source images to prepare for transformations failed?

I'm using ionic2, I want to set custom splash image so I set splash.png in ../myproject/resources/splash.png and then i run this command: ionic cordova resources --splash but I got this error:
Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1140:19)
at Object.onceWrapper (events.js:314:30)
at emitNone (events.js:110:20)
at TLSSocket.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1059:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
what should i do?
the problem was the internet connection speed is low

Meteor.loginWithFacebook Suddenly Producing Intermittent Timeouts when authenticating

Currently running Meteor 1.5 Release using a bundle that is deployed on our linode server. All has been ok in the past, but now in production environment when attempting to authenticate using Meteor.loginWithFacebook we are getting intermittent connection timeouts when the oauth attempts to establish the connection with Facebook server. The FB App settings appear fine. As mentioned, the logins will work most of the time but its not consistent.
We are using the popup style auth login flow.
For example: You sign in/sign out with no problem. Then repeat the same process again and its fine, and then for example you try again and it can suddenly just get hung up with a popup window trying to establish the facebook authentication.
On the server console log you will get these type of messages:
{"line":"431","file":"oauth.js","message":"Error in OAuth Server: Failed to fetch identity from Facebook. connect ETIMEDOUT 31.13.77.6:443","time":{"$date":1505065274956},"level":"warn"}
{"line":"431","file":"oauth.js","message":"Error in OAuth Server: Failed to complete OAuth handshake with Facebook. connect ETIMEDOUT 31.13.77.6:443","time":{"$date":1505065292025},"level":"warn"}
Exception in onLogin callback: Error: connect ETIMEDOUT 31.13.77.6:443
at Object.Future.wait (/var/bd/site/bd/09_09_2017_22_32_30/bundle/programs/server/node_modules/fibers/future.js:449:15)
at Object.call (packages/meteor.js:213:24)
at Object.HTTP.get (packages/http/httpcall_common.js:50:20)
at server/auth.js:48:34
at runAndHandleExceptions (packages/callback-hook.js:152:24)
at packages/callback-hook.js:159:12
at packages/accounts-base/accounts_server.js:167:5
at [object Object]._.extend.each (packages/callback-hook.js:128:15)
at AccountsServer.Ap._successfulLogin (packages/accounts-base/accounts_server.js:166:21)
at AccountsServer.Ap._attemptLogin (packages/accounts-base/accounts_server.js:356:10)
at [object Object].methods.login (packages/accounts-base/accounts_server.js:533:21)
at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1737:12)
at packages/ddp-server/livedata_server.js:719:19
at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
at packages/ddp-server/livedata_server.js:717:40
at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
- - - - -
at Object.exports._errnoException (util.js:907:11)
at exports._exceptionWithHostPort (util.js:930:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1081:14)
Please any help would be greatly appreciated. I cannot figure out why the timeout is occurring. It happens only sometimes.
Thank you!

How can I proceed run task on API Connect(IBM Bluemix)?

I'm in the tutorial of Bank A.
http://www.ibm.com/support/knowledgecenter/SSMNED_5.0.0/com.ibm.apic.toolkit.doc/tutorial_cli_api_def_working.html%23topic_qdj_dtb_gv?cp=SSMNED_5.0.0&lang=en
In API Designer(the part of IBM API Connect),I clicked the "run" button.
There is error about loading module.
How Can I fix this issue?
Then, I got the following output.
$ apic edit
Express server listening on http://127.0.0.1:9000
Unhandled rejection Error: Service manager failed to start. Please review > /home/sugai/.apiconnect/strong-pm/start.log for details.
at ChildProcess. (/usr/lib/node_modules/apiconnect/node_modules/apiconnect-cli-pm/lib/start/pm.js:122:23)
at ChildProcess.g (events.js:260:16)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
at Process.onexit (/usr/lib/node_modules/apiconnect/node_modules/apiconnect-cli-edit/node_modules/apim-ui/node_modules/loopback-workspace/node_modules/loopback/node_modules/continuation-local-storage/node_modules/async-listener/glue.js:188:31)
Reviewed the log file. There is following output.
https://gist.github.com/hokkai7go/ee0d453a60e60e1ab9109a851edae0c4