Git Product home page Git Product logo

Comments (10)

anagromataf avatar anagromataf commented on August 15, 2024

This looks like the problem we fixed in version 1.0.1.
Please try this version and look if your problem is still there.

from oauth2client.

ger86 avatar ger86 commented on August 15, 2024

I'm using 1.0.1 (the code changed from 1.0 is shown here : 35865c6) but i still have my problem.

Any idea? It works when i use

[[NXOAuth2AccountStore sharedStore] requestAccessToAccountWithType:@"myFancyService"]

without more arguments.

Thanks!

from oauth2client.

anagromataf avatar anagromataf commented on August 15, 2024

I just tired it with an OAuth2 service, that supports the username/password authorization low and it worked. Maybe the service you are using does not provide this flow?

Have you looked into the network traffic. For instance with http://www.charlesproxy.com/?

Cheers,
Tobias.

from oauth2client.

ger86 avatar ger86 commented on August 15, 2024

Sorry my web service was wrong. But i have another question.

When i call:

[[NXOAuth2AccountStore sharedStore] requestAccessToAccountWithType:
@"myFancyService"];

the application opens the safari mobile app. Is it normal? is possible to
embed that call in a UiWebView?

Thanks!

Gerardo Fernndez Moreno

Clases de Apoyo - www.clasesdeapoyo.com
tw: @ger86 http://www.twitter.com/ger86

2012/1/10 Tobias Krntzer <
[email protected]

I just tired it with an OAuth2 service, that supports the
username/password authorization low and it worked. Maybe the service you
are using does not provide this flow?

Have you looked into the network traffic. For instance with
http://www.charlesproxy.com/?

Cheers,
Tobias.


Reply to this email directly or view it on GitHub:
#17 (comment)

from oauth2client.

anagromataf avatar anagromataf commented on August 15, 2024

You can use this method and provide a block which opens the web view - [NXOAuth2AccountStore requestAccessToAccountWithType: withPreparedAuthorizationURLHandler:]. In the delegate of the web view you have to call - [NXOAuth2AccountStore handleRedirectURL:]. This method will return YES if the URL has been handled by the OAth2 framework.

Have a look at https://github.com/soundcloud/CocoaSoundCloudUI/blob/master/Sources/SoundCloudUI/SCLoginView.m#L118 which uses the OAuth2 Framework.

from oauth2client.

ger86 avatar ger86 commented on August 15, 2024

Hi, thanks. It works excellent. But i have another question.

The token request uses a POST request. Is it possible to modify it in order
to use a GET request?

Thanks!

Gerardo Fernndez Moreno

Clases de Apoyo - www.clasesdeapoyo.com
tw: @ger86 http://www.twitter.com/ger86

2012/1/11 Tobias Krntzer <
[email protected]

You can use this method and provide a block which opens the web view - [NXOAuth2AccountStore requestAccessToAccountWithType: withPreparedAuthorizationURLHandler:]. In the delegate of the web view you
have to call - [NXOAuth2AccountStore handleRedirectURL:]. This method
will return YES if the URL has been handled by the OAth2 framework.

Have a look at
https://github.com/soundcloud/CocoaSoundCloudUI/blob/master/Sources/SoundCloudUI/SCLoginView.m#L118which uses the OAuth2 Framework.


Reply to this email directly or view it on GitHub:
#17 (comment)

from oauth2client.

ger86 avatar ger86 commented on August 15, 2024

And i have another dubt.

Do you know if your library works with Twitter OAuth2 ? I'm trying to make
it work but i can't. Have you proved it?

I want to thank you your replies. They are very useful for me.

Gerardo Fernndez Moreno

Clases de Apoyo - www.clasesdeapoyo.com
tw: @ger86 http://www.twitter.com/ger86

2012/1/14 Gerardo Fernndez [email protected]

Hi, thanks. It works excellent. But i have another question.

The token request uses a POST request. Is it possible to modify it in
order to use a GET request?

Thanks!

Gerardo Fernndez Moreno

Clases de Apoyo - www.clasesdeapoyo.com
tw: @ger86 http://www.twitter.com/ger86

2012/1/11 Tobias Krntzer <
[email protected]

You can use this method and provide a block which opens the web view - [NXOAuth2AccountStore requestAccessToAccountWithType: withPreparedAuthorizationURLHandler:]. In the delegate of the web view you
have to call - [NXOAuth2AccountStore handleRedirectURL:]. This method
will return YES if the URL has been handled by the OAth2 framework.

Have a look at
https://github.com/soundcloud/CocoaSoundCloudUI/blob/master/Sources/SoundCloudUI/SCLoginView.m#L118which uses the OAuth2 Framework.


Reply to this email directly or view it on GitHub:
#17 (comment)

from oauth2client.

anagromataf avatar anagromataf commented on August 15, 2024

Regarding the POST request:

I'm not so deep into this part of the framework and the OAuth2 specs. But I guess you just need to change these requests to GET.

https://github.com/nxtbgthng/OAuth2Client/blob/master/Sources/OAuth2Client/NXOAuth2Client.m#L243

We are using this framework in the first place for the SoundCloud API, but it should work with other OAuth2 servers. Keep in mind that this framework implements draft 10 of the OAuth2 spec.

from oauth2client.

joshholat avatar joshholat commented on August 15, 2024

I'm getting the -[NXOAuth2PostBodyStream open] Stream has been reopened after close error as well. Specifically, it appears to be happening here in NXOAuth2Client.m:

// Web Server Flow only
- (void)requestTokenWithAuthGrant:(NSString *)authGrant redirectURL:(NSURL *)redirectURL;
{
    ...
    authConnection = [[NXOAuth2Connection alloc] initWithRequest:tokenRequest
                                               requestParameters:parameters
                                                     oauthClient:self
                                                        delegate:self];
    authConnection.context = NXOAuth2ClientConnectionContextTokenRequest;
}

I get can past the initial request to get the request token, but this second request to get the access token appears to be failing. Could you perhaps explain what might cause this to occur inside of the framework so that I can have a better shot at debugging it?

from oauth2client.

RobertAudi avatar RobertAudi commented on August 15, 2024

I get the same error message, even though everything seems to work properly... Details in this SO question

from oauth2client.

Related Issues (20)

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.