Hi All: I have integrated asana with my ios app using AsanaAPIKey for the user authentication. Now I want to do it using oauth authentication(new requirement).I have searched a lot but haven't found any valuable stuff related to this.Some examples are given in Ruby,but I know nothing about Ruby.Can any one help me out.
We don't have official iOS examples, but in general OAuth on Asana tries to be as close to "typical" as possible. Check out another SO question, https://stackoverflow.com/questions/5374570/whats-the-best-ios-oauth2-framework, for help with iOS and OAuth 2.0, between that and the developer docs https://asana.com/developers/documentation/getting-started/authentication I hope you find what you need, but if you run into specific issues please share them!
In the long-term we're hoping to have a proper iOS SDK to make this easier, but given constrained resources I wouldn't hold your breath on that.
Related
If the user is logged-in with the native Twitter app installed, I want my app to open the Twitter app to request authorization.
I already implemented the flow to get the oauth_token in order to start the login process through Twitter's api. Only, the current API Documentation do not mention anything about how to use the native iOS app in the process. It only sends back a url for the user to log in.
let url = URL(string: "https://api.twitter.com/oauth/authorize?oauth_token=\(result.oauthToken)")!
DispatchQueue.main.async {
UIApplication.shared.open(url)
}
On getting the requested oauth_token, I get this link. Opening the link will display a Webview to login. Not the native Twitter iOS app.
I tried to use a deeplink to manually launch the Twitter app, but I couldn't found any resources on how to setup the link properly.
So far I have tried things like:
twitterauth://authorize?consumer_key=[KEY]&consumer_secret=[SECRET]&oauth_callback=swifter-[KEY]
or
twitterauth://authorize?oauth_token=\(result.oauthToken)
without any success...
As mentioned in another post, Clubhouse has implemented exactly this flow. So it is possible. The question is how ? 😅
This flow seems to have not been officially supported since the retirement of TwitterKit on May 1, 2018. Any applications that still offer this functionality to their end users likely have some sort of partnership with Twitter to allow for this which is otherwise undocumented publicly.
The reasoning for this was detailed sparsely in a related Twitter Developer Forums thread:
Unfortunately at this time we have had to make some incremental adjustments that are not so smooth for everyone; especially as you’ve found, for mobile app developers. We’re in the middle of a transition to a new API platform (via Twitter Developer Labs) and there will be some changes as we go along - we are asking for your feedback to help us, and if you check the ideas, authentication and authorization is something we’ve heard a lot about.
I cannot tell you today exactly when we’ll get to an enhanced solution, but this is something we are actively working on.
Direct link
The official guidance is to use the traditional WebView method until Twitter officially re-releases this capability:
I don’t believe that this is possible any longer, so I would encourage you to use the full OAuth flow. I apologise that this may not be what your users prefer, but this is the documented way to gain authorisation (we do not document or support URL schemes for the native iOS app).
Direct link
We do not support or document any means of users signing in to Twitter outside of the OAuth flow; any use of undocumented features is subject to change without notice.
Direct link
As linked above Twitter appears to be soliciting feedback on this via their UserVoice page, should you feel so inclined to suggest the re-implementation of such a feature.
I am trying to implement Google Drive SDK in my project but nothing seems to go well, i wanted to upload images and create folder on Google Drive but i am stuck with the error ,which i don't know how to get through, as i found nothing related to the following error.
I have strongly followed this link for code
Google has updated its security restrictions for OAuth flow. They are not going to allow native web-views to initiate OAuth flows. You will need to use the OS browsers to do so.
Modernizing OAuth interactions in Native Apps for Better Usability and Security
You may have to wait for google to update the sample code or figure out how to do it yourself sorry i am not an IOS developer so cant be of any help.
The issue is already logged on the issue forum for Google drive 4919
I'm gonna make an native iOS app with Swift 2 and Xcode 7. The users should login using LinkedIn and OAuth 2 but I'm wondering how I should begin to set this up. I don't have many experience with OAuth 2.
Is there a good tutorial or a sample app? I saw the Ray Wenderlich post but that comes with an existing project. I want to build an app with LinkedIn login from scratch.
EDIT
I want to use the LinkedIn login to get the user's connections and send them notifications. I was researching this and I found some pages that said that connections can't be retrieved from the new LinkedIn API, is this true? It is not possible to get someone's connections from LinkedIn in a native iOS applications?
You should start with LinkedIn guide for LinkedIn and OAuth 2 .
But still if you need a sample for Authentication with OAuth 2 here it is .
For your second question related to the connection yes Linked have made changes but the API is still available but for the partners .
If you are an existing LinkedIn partner, these changes will not impact your existing partnership or the associated APIs that your partnership allows you to access.
If you are experiencing issues as a result of the May 12th changes, please reach out to your LinkedIn Business Development representative immediately.
For further details you can see Developer Program Transition Guide.
Check out this repo, I did this swift pre-2.0 but it shows you the basic algorithm. You can do it the with your secret hard coded or fetch it from the server. The key is getting the oath header just right which is a huge pain
https://github.com/GregPrice24/SwiftStream
Check this out: https://github.com/jeyben/IOSLinkedInAPI
I used this repo and successfully implement LinkedIn integration in my App. It is in Objective-C but you can use Cocoapods and import them as Frameworks and use in swift2 with no trouble.
Note: As of the 12´ May 2015 LinkedIn applied restrictions to API usage for all non partners: See: https://developer.linkedin.com/blog/posts/2015/developer-program-changes
So you can only get the basicprofile at the beginning, but you can apply for the partner program to get those extra information such as connections here: https://developer.linkedin.com/partner-programs
I've been told to use Oauth2.0, but I don't understand what I am to do with it on either side.
I would specifically like to achieve the persistent login that Facebook and Twitter maintain in their respective iOS apps.
PLEASE give me a specific answer (and hopefully an example too!)
I know that this may be achieve with Oauth2.0, but I have been unable to find an example as to how (even after extensive research- if I could find the answer I wouldn't be asking the question here.)
Thank you in advance!
-John
I am creating a GPS mobile dating application that utilizes the free foursquare places API for iOS. I was told by my developer that foursquare offers an enterprise API for a fee. Is this true? And if so, does anyone know any information regarding purchasing this API? Any info is greatly appreciated.
Thanks
There is no special or "enterprise" API, but we'd like to think our standard API is pretty advanced! ;) There are tons of successful apps that have built upon our APIs, and hopefully it'll meet your needs too. Check out https://developer.foursquare.com/ for all the info.
So, all the APIs we currently offer are free. If you want, you can find out more about this kind of thing in our platform policies: https://foursquare.com/legal/api/platformpolicy