Ionic 3 / auth0 error when running in browser - auth0

I'm trying to follow the Ionic quickstart for here: https://auth0.com/docs/quickstart/native/ionic2
When I do this ( or run the sample ) and run "ionic serve" I get the following error when the login button is clicked
TypeError: Cannot read property 'isAvailable' of undefined
at Function.Browser.isAvailable (http://localhost:8100/build/main.js:115566:30)
at getAgent (http://localhost:8100/build/main.js:115598:23)
at CordovaAuth.authorize (http://localhost:8100/build/main.js:64570:3)
at AuthService.login (http://localhost:8100/build/main.js:64460:16)
at Object.eval [as handleEvent] (ng:///AppModule/HomePage.ngfactory.js:39:29)
at handleEvent (http://localhost:8100/build/main.js:12083:138)
at callWithDebugContext (http://localhost:8100/build/main.js:13291:42)
at Object.debugHandleEvent [as handleEvent] (http://localhost:8100/build/main.js:12879:12)
at dispatchEvent (http://localhost:8100/build/main.js:9058:21)
at http://localhost:8100/build/main.js:9648:38
at HTMLButtonElement.<anonymous> (http://localhost:8100/build/main.js:39395:53)
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:12256)
at Object.onInvokeTask (http://localhost:8100/build/main.js:4394:37)
at t.invokeTask (http://localhost:8100/build/polyfills.js:3:12177)
at n.runTask (http://localhost:8100/build/polyfills.js:3:7153)
Seems to work OK in ios but not browser. Why is this? Is it because auth0 sdk now uses the safariviewcontroller instead of InAppBrowser?

It is mentioned in the page why:
Please note that PKCE authentication requires testing on either an emulated or real device. Attempting authentication when testing in the browser will fail because PKCE requires a device browser.

Related

WalletConnectProvider from react-native-dapp not working

I am trying to implement a functionality in my react-native app where in I can connect my app with metamask or any other non-custodial wallet app. The library I am using for this is https://www.npmjs.com/package/#walletconnect/react-native-dapp.
The following is the code snippet:
<WalletConnectProvider
redirectUrl={Platform.OS === 'web' ? window.location.origin : 'yourappscheme://'}
storageOptions= {{
asyncStorage AsyncStorage,
}}>
<>{/* awesome app here */}</>
</WalletConnectProvider>
However, when I try to run the app, it shows the following errors:
TypeError: undefined is not an object (evaluating '_$$_REQUIRE(_dependencyMap[0], "./providers").WalletConnectProvider')
Error: Requiring module "node_modules\#walletconnect\react-native-dapp\dist\providers\index.js", which threw an exception: TypeError: Object prototype may only be an Object or null.
Any idea why this issue?
I was facing the issues due to the use of npx rn-nodeify --install --hack.
Tried using "node-libs-react-native" inside the devDependencies as suggested at
https://github.com/WalletConnect/walletconnect-monorepo/issues/753

react-native-signature-canvas not working properly in expo IOS

react-native-signature-canvas is not working properly in Expo, it throws an error "Unable to open URL".
I am using package of react-native-signature-canvas signature using env Expo.
What is going on here? I just simply copy and paste this code from React Native Signature Component based Canvas for Android && IOS && expo.
I used the same code example provided on above page.
Error Message:
RemoteConsole.js:80 Possible Unhandled Promise Rejection (id: 0):
Error: Unable to open URL: ReactABI32_0_0-js-navigation://postMessage?data%253Aimage%252Fpng%253Bbase64%252CiVBORw0KGgoAAAANSUhEUgAAAuQAAAVWCAYAAAD ... YII%253D
I solved this error, this error throws because of remote debugger is on after i stop remote debugging it works fine.

Express.js using passport-facebook - TypeError: Object 302 has no method 'indexOf'

I've got an express project already running, I'm just trying to hook it up using passport to authenticate through facebook, I've basically copied the example from the github page here:
https://github.com/jaredhanson/passport-facebook
But I'm getting the following error whenever I try to go to the '/auth/facebook' URL in my app:
TypeError: Object 302 has no method 'indexOf'
at ServerResponse.res.redirect (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/response.js:546:13)
at Strategy.strategy.redirect (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport/lib/middleware/authenticate.js:294:15)
at Strategy.OAuth2Strategy.authenticate (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport-facebook/node_modules/passport-oauth2/lib/strategy.js:227:10)
at Strategy.authenticate (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport-facebook/lib/strategy.js:84:41)
at attempt (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport/lib/middleware/authenticate.js:337:16)
at authenticate (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/passport/lib/middleware/authenticate.js:338:7)
at callbacks (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:171:11)
at param (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:145:11)
at pass (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:152:5)
at Router._dispatch (/Users/jlawrence/Documents/Websites/Node/Gigster/node_modules/express/lib/router/index.js:179:5)
It could be an incompatibility with older versions of express; you might try updating to express#3.5.x; 3.6 and above deprecated some methods and the refactor might not be worth it.
Try npm install express#3.5.x, or npm install express#3.5.x -g if it's a global package. Make sure to update the package.json file too.

gapi.auth.authorize: Error: _.Uu is not a function

My web application started to error out yesterday when calling gapi.auth.authorize, and there is no code change. Below is the error stack:
Error: .Uu is not a function
mk#/scs/apps-static/_/js/k=oz.gapi.en.1gq98XyFUlU.O/m=client/rt=j/sv=1/d=1/ed=1/am=IQ/rs=AItRSTPj42_xcRHRghwn4h4H79TdCPg3pw/cb=gapi.loaded_0:234">https://apis.google.com//scs/apps-static//js/k=oz.gapi.en.1gq98XyFUlU.O/m=client/rt=j/sv=1/d=1/ed=1/am=IQ/rs=AItRSTPj42_xcRHRghwn4h4H79TdCPg3pw/cb=gapi.loaded_0:234
qA#/scs/apps-static//js/k=oz.gapi.en.1gq98XyFUlU.O/m=client/rt=j/sv=1/d=1/ed=1/am=IQ/rs=AItRSTPj42_xcRHRghwn4h4H79TdCPg3pw/cb=gapi.loaded_0:236">https://apis.google.com//scs/apps-static//js/k=oz.gapi.en.1gq98XyFUlU.O/m=client/rt=j/sv=1/d=1/ed=1/am=IQ/rs=AItRSTPj42_xcRHRghwn4h4H79TdCPg3pw/cb=gapi.loaded_0:236
.sk#/scs/apps-static/_/js/k=oz.gapi.en.1gq98XyFUlU.O/m=client/rt=j/sv=1/d=1/ed=1/am=IQ/rs=AItRSTPj42_xcRHRghwn4h4H79TdCPg3pw/cb=gapi.loaded_0:238">https://apis.google.com//scs/apps-static//js/k=oz.gapi.en.1gq98XyFUlU.O/m=client/rt=j/sv=1/d=1/ed=1/am=IQ/rs=AItRSTPj42_xcRHRghwn4h4H79TdCPg3pw/cb=gapi.loaded_0:238
Is anyone seeing the same problem? Not sure if Google is making any changes.
Google broke the JS client yesterday. It's being tracked here https://code.google.com/p/google-api-javascript-client/issues/detail?id=103

Browser Console full of errors in IceFaces 3.3.0

As the title says, my browser console is really full of errors some of which are as follows:
Error: ReferenceError: css_ims is not defined
Error: TypeError: br.log is undefined
Error: TypeError: window.ice.onLoad is not a function
Error: TypeError: ice.captureSubmit is not a function
Error: TypeError: ice.setupBridge is not a function
Error: TypeError: ice.push is undefined
Error: TypeError: ice.captureSubmit is not a function
Error: TypeError: ice.onBeforeSubmit is not a function
And guys let me also tell you about the Icefaces version I used:
1. icefaces-3.3.0.jar
2. icefaces-ace-3.3.0.jar
3. icefaces-compat-3.3.0.jar
4. icefaces-mobi-1.2.0.jar
5. icepush-3.3.0.jar
Prior to the use of these 3.3.0 versions and icefaces-mobi-1.2.0.jar I was using 3.0.1 versions and no use of icefaces-mobi-1.2.0.jar in which the browser console was having none of the above mentioned errors. So I was thinking this might be the compatibility issue.
(Note:Here the icefaces mobi jar is used for Mobile related things.)
Thanks in advance. Any help would greatly be appreciated! :)
I'm not sure if adding ICEmobile is causing these JavaScript errors, but ICEmobile 1.2.0 is designed to be used with ICEfaces 3.2.0. For ICEfaces 3.3.0 you should use ICEmobile 1.3.0. Also be sure to clear your browser cache before retrying.
Those errors occurs because all/some icefaces javascript files are not downloaded to the client.
I faced this problem: I investigated this issue using firebug(firefox plug-in) and I found that all resources URL which includes (javax.faces.resource) are giving 302 response error which means that the request is redirected.
I double check and found that I have (javax.servlet.Filter) called AuthenticationFilter which filters all the requests, and if the user doesn't login all requests are redirected to the login page.
To solve this issue: in AuthenticationFilter.doFilter(ServletRequest request, ServletResponse response,FilterChain chain)
I added the if statement:
if (path.contains("javax.faces.resource") || path.contains("/css") || path.contains("/images") || path.contains("/js")) {
chain.doFilter(request, response); // Just continue chain.
return;
}