Comments (10)
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.
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.
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.
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.
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.
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 returnYES
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.
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/ger862012/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 returnYES
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.
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.
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.
I get the same error message, even though everything seems to work properly... Details in this SO question
from oauth2client.
Related Issues (20)
- How to Get Oauth token using Basic authorization HOT 2
- iOS 9 support? HOT 5
- Crash in accountsFromDefaultKeychain assert HOT 1
- OAuth with UiWebView And SSL HOT 1
- FitBit: Authorization header required HOT 8
- Support iOS 9
- Can OAuth2Client Works with Authorization code grant type? HOT 1
- NXOAuth2Request.performMethod cannot be started on background queue HOT 1
- Custom header fields not applied to token refresh request
- refresh access token failing HOT 1
- NXOAuth2Request with custom headers and JSON Body payload
- New pod release? HOT 2
- it does not work properly for fitbit HOT 1
- Crash in NXOAuth2AccountStore HOT 2
- Integration with ADAL
- Can we use this library in swift App.
- "NXOAuth2Request performMethod" does not refresh token after token expired
- Where is the observer for NXOAuth2AccountDidFailToGetAccessTokenNotification?
- Crash in NXOAuth2AccountStore - didFailToGetAccessTokenWithError
- F HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth2client.