ionic-team / ionic-plugin-deeplinks

Handle deeplinks into your Ionic/Cordova apps from Universal Links, App Links, and Custom URL schemes. For those using Ionic 2, there are some nice goodies that make life easier.
Other
332 stars 218 forks source link

iOS: ionic-plugin-deeplink not compatible with cordova-plugin-linkedin #137

Open mohpra opened 6 years ago

mohpra commented 6 years ago

I have implemented native linkedin login using cordova-plugin-linkedin and its working fine. However for cases where linkedin app is not present on the iOS device, I am using auth0 for my ionic3 project. I followed this tutorial: https://auth0.com/docs/quickstart/native/ionic2/01-login

The auth0 linkedin login didn't work for me on iOS 11 . I removed cordova-plugin-customurlscheme and instead used ionic-plugin-deeplinks. After this change the auth0 login started working.

However now my native linkedin login using cordova-plugin-linkedin is not working and I guess there is some compatibility issues between cordova-plugin-linkedin and ionic-plugin-deeplinks.

Any help would be great.

ZmartifyPKR commented 6 years ago

I'm even having trouble get auth0 working on IOS. Works perfect on Android. I unable to return from the Lock screen - nothing happens.. Any suggestions??

jkufrin commented 6 years ago

I'm having a similar issue. Linkedin login worked fine up until I just added this plugin. Now when it jumps to Linkedin and then tries to return the LISDKSessionManager doesn't seem to be listening. Upon returning to my app, the following line doesn't fire anymore: lisdksession manager openURL called!,

Something with this plugin is blocking Linkedin form firing the openUrl command.

jbelelieu commented 6 years ago

+1 I am seeing this issue today as well. Is there a solution to this?

jkufrin commented 6 years ago

@jbelelieu https://github.com/zyra/cordova-plugin-linkedin/issues/48#issuecomment-363989224

jbelelieu commented 6 years ago

@jkufrin Worked like a charm. Can't thank you enough :)

fab971 commented 5 years ago

@jkufrin @jbelelieu The links is broken...can you share what fixed the issue please :) I'm frustrated of seeing this link broken :(

jkufrin commented 5 years ago

Ya, I was disappointed that deeplink issue got completely removed. Luckily, I found an old email from a reply post to my solution. Shout out to @jefvanhoyweghen for automating it into a hook:

I created an after_prepare cordova hook to solve this issue automatically using the code of @jkufrin .

First create the hook in scripts/fixLinkedInDeeplink.js using the code of the following Gist: https://gist.github.com/jefvanhoyweghen/5af9c4dcca11ec55242d3b518ec08b6c

Be sure to replace the [APP_NAME] and [APP_ID] tags with your own. Next add the following line to the config.xml of your cordova project. This will make sure that after • cordova prepare • cordova platform add • cordova build • cordova run it will perform the hook. (https://cordova.apache.org/docs/en/latest/guide/appdev/hooks/)

<hook src="scripts/fixLinkedInDeeplink.js" type="after_prepare" />

fab971 commented 5 years ago

Thanks a lot!

Using a hook script to "override" the right variables from the LinkedIn signin logic is nice. Unfortunately it seems that it will not work in my case. I'm trying to reproduce this fix for kakao login (instead of linkedin) but the logic that builds the oauth redirection url seems to be located within the SDK (which is not public)... I'll see if I can get some help from them :)