Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Can we force OAuth2 login even when the LinkedIn app is installed? #18

Closed
Dev-iL opened this issue Dec 24, 2016 · 6 comments
Closed

Comments

@Dev-iL
Copy link

Dev-iL commented Dec 24, 2016

Hello!

As the title says - I'm wondering if there's a simple way to force OAuth2 despite having the LinkedIn app available. The reason I want to do this is because following the official guides resulted in control not coming back to my app after the LinkedIn login was complete (it just stays inside the LI app; with and without this library). However, when the LI app is removed, the OAuth2 fallback flow works flawlessly.

Thank you for this library!

@joonhocho
Copy link

I also noticed that official SDK doesnt call the callbacks on both success and error.

@joonhocho
Copy link

@Dev-iL, My temporary solution is to remove all LSApplicationQueriesSchemes from Info.plist so that your app thinks that LinkedIn app is not installed.

@tonyli508
Copy link
Owner

You can override NativeAppInstalledChecker's isLinkedinAppInstalled function, make it always return false, then pass it into LinkedinSwiftHelper.

@Dev-iL
Copy link
Author

Dev-iL commented Jan 29, 2017

@joonhocho I came to share my own "solution" (which I found several days after posting the issue), only to realize that it's identical to yours. I arrived at this workaround after trial and error, so I had no idea why/how it worked... Until now :) Thanks for the explanation!

@vaibhav-varshaaweblabs
Copy link

@tonyli508 How can we set isLinkedInAppInstalled false?

@tonyli508
Copy link
Owner

@vaibhav-varshaaweblabs subclass NativeAppInstalledChecker's override isLinkedInAppInstalled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants