Git Product home page Git Product logo

simpleauth's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simpleauth's Issues

Twitter-web

While trying to use Twitter-web, with the following code :

[SimpleAuth authorize:@"twitter-web" completion:^(id responseObject, NSError *error) {
        NSLog(@"%@", responseObject);
        NSLog(@"%@", error);
    }];

I get the following error (and the UIWebView doesn't show up):

Error Domain=NSURLErrorDomain Code=-1012 "The operation couldn’t be completed. (NSURLErrorDomain error -1012.)" UserInfo=0xa972a80 {NSErrorFailingURLKey=https://api.twitter.com/oauth/request_token, NSErrorFailingURLStringKey=https://api.twitter.com/oauth/request_token, NSUnderlyingError=0xfc79580 "The operation couldn’t be completed. (kCFErrorDomainCFNetwork error -1012.)"}

Even if I made sure to setup the consumer key and the consumer secret !

LinkedIn field selectors

When SimpleAuthLinkedInWebProvider calls the LinkedIn API to get the user's account, it doesn't pass in any field selectors, therefore only the default fields come back. Has anyone worked out an easy way to specify field selectors?

Here's the URL string that SimpleAuthLinkedInWebProvider constructs:

GET https://api.linkedin.com/v1/people/~?< query params >

To specify field selectors, you have to specify them in the resource path, like this:

GET https://api.linkedin.com/v1/people/~:(id,first-name,last-name,formatted-name,headline,location)?< query params >

Won't build in Xcode 6

Keep getting this error:
Lexical or Preprocessor Issue 'SimpleAuthProvider.h' file not found on #import "SimpleAuthProvider.h" in SimpleAuthFacebookProvider.h

Update Cocoapods

Hey Caleb,

I saw that you updated the podspecs, but have you submitted a PR to Cocoapods for the 0.3.1 release?

Thanks!

Cookies need to be enabled for LinkedIn

I was having trouble getting LinkedIn to work, using just the demo app. The web view would get displayed, but after entering my email and password, the web view would display "Request Error: We're sorry, there was a problem with your request. Please make sure you have cookies enabled and try again."

After modifying canonicalRequestForRequest to set HTTPShouldHandleCookies to YES, it started working.

Is this a known issue?

Is it in usable state yet?

@calebd First of all, thanks a lot for starting this repo. I was also thinking that there should be one library where you can pick and use which oauth system you want to use in your app. Was tired with facebook, twitter, google different handling. Is the library in usable state yet? I see that you're creating facebook, twitter's own repo as modules. Can you tell me a little bit more about your plans for this repo and if in some ways we can help.

Error on adding SimpleAuth

On including SimpleAuth via Cocoapods, I am getting following error in Pods-Contakt-LlamaKit :

error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: unknown option character `X' in: -Xlinker

LinkedIn Specification not found

I am unable to install the provider for LinkedIn using the spec listed in the SimpleAuth.podspec file. Is LinkedIn still supported?

[!] Unable to find a specification named SimpleAuth/LinkedInWeb in SimpleAuth (0.3.2).
[!] Unable to find a specification named SimpleAuth/LinkedIn in SimpleAuth (0.3.2).

GENERAL_CANCEL button title

In SimpleAuthTwitterProvider.m, the UIActionSheet cancel button title is GENERAL_CANCEL. Can that be changed to something less loud... like, Cancel?

facebook-web and foursquare providers

Hi!

I've been looking at SimpleAuth in order to use it in my application and find it very interesting, but I have several questions to ask. One of my goals is to be able to connect my users via Facebook, Twitter or Foursquare.

Do you plan to add a fallback mechanism for the providers which have a web equivalent? (e.g. Facebook or Twitter) Or is it the responsibility of the user/developer to switch to the web provider when the native one doesn't work?

I read on your blog that you don't like having 3rd party SDKs in your app, and that it is one of the motives behind SimpleAuth ; nonetheless, I saw that you were planning on adding Foursquare to the providers. Will you use the official oauth framework? If not, how will you manage to do it?

I'm still analyzing your library and might integrate it in my app in the next few days, therefore I will probably implement the Foursquare provider.
I'll be glad to open a PR when and if my provider works well.

Thank you for the great lib. :)

Add a way to cancel an authorization request

Hi Caleb,

With @kornifex we are facing another issue when our user wants to cancel the authorize request.

Sorry but we don't have time at the moment to fix this issue.
Maybe a simple Block_release on the completion block in the main thread could do the job.

Let me know if you have better idea to handle this.
We may come back with a fix later this week.

Thanks for the hard work.
Antoine

Some strange Major bug occuring

Hi @calebd

Came back to SimpleAuth after long time. You have done major progress by the time for SimpleAuth. There's one strange bug happening though. Here's the scenario:

  1. Installed 2 application using SimpleAuth facebook
  2. Connected First application with facebook successfully
  3. In Second application If I disallow access or any other error occurs while connecting to facebook.
  4. The first application start returning NULL as response object. No matter what.

I tried uninstalling both application. And installed first application again, but still the response object is NULL.

Created completely 2 fresh application but the problem didn't resolve. The namespace are different, both facebook applications are also different.

I deleted my account from Settings and installed the first application and then it starts working.

Not sure why this is happening, have to look into code. But can you confirm this is happening or not?

responseObject and error is (null) - Foursquare

I'm pretty sure I have everything set up correctly. When I launch my app, I get the Foursquare login screen. After I log in, the output from both the responseObject and error is (null). Any idea why?

Twitter Provider - handling iOS revoked token

Hello,

While implementing the Twitter provider, we stumbled upon a fringe issue: our iOS Twitter account was logged in the settings, but revoked on Twitter side (using their web interface).

Both remote calls remoteAccountWithSystemAccount and accessTokenWithSystemAccount occurs at the same time, that led to an issue if an error occurred during the first call.
Maybe you should differ the second call in this case.

NSArray *signals = @[
         [RACSignal return:account],
         [self remoteAccountWithSystemAccount:account],
         [self accessTokenWithSystemAccount:account]
];
return [self rac_liftSelector:@selector(dictionaryWithSystemAccount:remoteAccount:accessToken:) withSignalsFromArray:signals];

In our case, the first one returned a 401 HTTP status code with a 89 error code (see Twitter's documentation for a full list of error codes), which should be handled to renew the account's credentials with [ACAccountStore renewCredentialsForAccount:completion:]. Maybe this should even be extended to all 401 and 403 HTTP status codes without checking for specific Twitter error codes.

@amarcadet and I would have liked to help you on this one, but as we're not very fluent with ReactiveCocoa, we were afraid to mess up…

We are open to discuss of this one with you!

Cannot log in into facebook-web

Every time I try to log in using facebook-web I'm getting:

Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

The FB app is correctly setup (I can connect using FB SDK)

Facebook - dictionaryWithRemoteAccount have no checks for nil in optional values

For example, let's see at User Info block:

// User info
NSMutableDictionary *user = [NSMutableDictionary new];
user[@"nickname"] = remoteAccount[@"username"];
user[@"email"] = remoteAccount[@"email"];
user[@"name"] = remoteAccount[@"name"];
user[@"first_name"] = remoteAccount[@"first_name"];
user[@"last_name"] = remoteAccount[@"last_name"];
user[@"image"] = avatar;
if (location) {
    user[@"location"] = location;
}
user[@"verified"] = remoteAccount[@"verified"];
user[@"urls"] = @{
    @"Facebook" : remoteAccount[@"link"],
};

But my own profile has no Username and my app will crash when I try to authorize via Facebook.

Swift Rewrite

I have the following goals for a new version of SimpleAuth that solves many of the issues we see today:

  • Swift
  • Strongly typed provider configurations
  • Make SimpleAuthProvider a subclass of NSOperation
  • The SimpleAuth class will maintain an instance of NSOperationQueue to ensure serial operations
  • Favor direct provider interaction over the indirection that is used today
  • Keep existing API (deprecated)

Facebook SimpleAuthErrorDomain error 2

I've been getting SimpleAuthErrorDomain error 2 when using FB to login for the past week and a half or so.

This is the log I get:

Error Domain=SimpleAuthErrorDomain Code=2 "The operation couldn’t be completed. (SimpleAuthErrorDomain error 2.)" UserInfo=0x170c75480 {NSUnderlyingError=0x170252390 "The operation couldn’t be completed. (com.apple.accounts error 7.)"}

in SimpleAuthFacebookWebLoginViewController.m

This line below cause error.

@"scope" : [self.options[@"permissions"] componentsJoinedByString:@","]

2014-09-15 15:55:32.027 Pregnant[3135:60b] -[__NSCFConstantString componentsJoinedByString:]: unrecognized selector sent to instance 0x6ae31c
2014-09-15 15:55:32.031 Pregnant[3135:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString componentsJoinedByString:]: unrecognized selector sent to instance 0x6ae31c'

*** First throw call stack:

if I use this only @"scope" : self.options[@"permissions"] . the return request is "nil"

Instagram API

Does SimpleAuth allow for using the API with the option of not authenticating the user, only authenticating the developer?

i.e. Just wanting to view a photo stream, no need to post anything (like, comment, etc).

Investigate SSO providers.

It would be cool if SimpleAuth worked with single-sign-on providers like Dropbox and Facebook. Fire off to one of those apps, come back, hand the URL to SipmleAuth, get tokens.

Remove `SAMCategories` dependency.

I'll need to provide my own NSDictionary <-> form encoded string implementation since that is going to be common among all providers.

Google provider

I am trying to add Google provider, but issue is that Google doesn't actually redirect to redirect_url, Normally in all other providers we use webViewhouldStartLoadWithRequest, instead of that we have to use webViewDidFinishLoad. Any suggestions regarding how to implement this without ruining the simplicity of the code ??

xcworkspace file not generating in latest project

After yesterday's commit, I facing a strange issue, Downloaded a new source and updating pods doesnt creating xcworkspace file in my project.

I dont know anything wrong with my configuration or there is some issue with new release.

Define constants for the keys in the configuration

Hi!
What do you think about using constants for the keys in the configuration dictionaries?
It would be nice that each provider has the constants that it expects for the keys. I think that using simply strings its much error prone. Also, with the constants defined in each provider header file, the consumer would have more documentation about how to use the provider ;)

SimpleAuthTwitterProvider not showing UIActionSheet on iPad2 iOS 8.1

- (void)presentActionSheet:(UIActionSheet *)actionSheet {
    UIWindow *window = [UIWindow SimpleAuth_mainWindow];
    [actionSheet showInView:window];
}

Not working on iOS8. It doesn't work because Apple changed internal implementation of UIActionSheet.
Can you please use UIAlertController with a preferredStyle of UIAlertControllerStyleActionSheet?

Silent Login on Launch

One thing that seems to be missing is a method that performs a "silent login" attempt on login using a previously saved auth token. Without this, the user would need to re-log in to the app every time it launches.

Is this on the roadmap? We may try to figure this out ourselves, just wasn't sure if you had a plan for it already.

Would be a lot better if you create a SimpleAuthUser

@calebd Also it would be a lot better that you create a NSObject for SimpleAuthUser and fill the necessary properties in that. So in case someone requires a Facebook Access Token, expires at etc. it can be filled in the SimpleAuthUser class. What do you think?

Authorization

This may be a dumb question, but SimpleAuth does not provide a way to Authenticate instead of Authorize, right?

Issues with adding Foursquare authentication

I my pod-file i write:

pod 'SimpleAuth/FourSquare'

I go to terminal, locate my project folder and type: 'pod'

The error I receives is the following: "[!] Unable to find a specification named SimpleAuth/FourSquare in SimpleAuth (0.3.2)."

Edit: I have tried writing both Foursquare and FourSquare. The error is the same either way

Adding logout mechanism

Superb and really nice framework, I wish I would have find out this earlier, by the way can anyone enlighten me about which is the best way to implement logout mechanism ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.