google / gtm-oauth Goto Github PK
View Code? Open in Web Editor NEWGoogle Toolbox for Mac - OAuth Controllers
License: Apache License 2.0
Google Toolbox for Mac - OAuth Controllers
License: Apache License 2.0
What steps will reproduce the problem?
1. Try to authenticate with an OAuth service (not a Google service).
2. Get to the authorize step.
3. The service will not redirect to the oauth_callback specified because it was
only sent with the request_token request.
What is the expected output? What do you see instead?
According to OAuth 1.0 documentation, you should send the oauth_callback
parameter with the authorization request. gtm-oauth does not do this.
What version of the product are you using? On what operating system?
Trunk, iOS 4.0
Please provide any additional information below.
See http://oauth.net/core/1.0/#anchor25 for an example of 3 legged
authentication where oauth_callback is sent as a parameter to step 2
(authorization).
Original issue reported on code.google.com by [email protected]
on 7 Dec 2010 at 7:27
What steps will reproduce the problem?
1. Select 'Google'.
2. Press 'Sign in..' button.
3. Sign in to Google and authorize contacts. The contacts should be downloaded.
4. Press 'Sign Out' button. Crash happens with this message.
Program received signal: “EXC_BAD_ACCESS”.
(gdb)
#0 0x026f9918 in objc_msgSend
#1 0x05f33240 in ??
#2 0x004e668b in -[UIBarButtonItem(UIInternal) _sendAction:withEvent:]
#3 0x002da7f8 in -[UIApplication sendAction:to:from:forEvent:]
#4 0x00365de0 in -[UIControl sendAction:to:forEvent:]
#5 0x00368262 in -[UIControl(Internal) _sendActionsForEvents:withEvent:]
#6 0x00366e0f in -[UIControl touchesEnded:withEvent:]
#7 0x002fe3d0 in -[UIWindow _sendTouchesForEvent:]
#8 0x002dfcb4 in -[UIApplication sendEvent:]
#9 0x002e49bf in _UIApplicationHandleEvent
#10 0x02d88822 in PurpleEventCallback
#11 0x0257dff4 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
#12 0x024de807 in __CFRunLoopDoSource1
#13 0x024dba93 in __CFRunLoopRun
#14 0x024db350 in CFRunLoopRunSpecific
#15 0x024db271 in CFRunLoopRunInMode
#16 0x02d8700c in GSEventRunModal
#17 0x02d870d1 in GSEventRun
#18 0x002e8af2 in UIApplicationMain
#19 0x00002524 in main at mainTouch.m:20
What is the expected output? What do you see instead?
It shoud sign out without crash.
What version of the product are you using? On what operating system?
r24. iOS 4.1
Please provide any additional information below.
The crash doesn't happen when it connects to Twitter.
Original issue reported on code.google.com by [email protected]
on 30 Sep 2010 at 1:48
What steps will reproduce the problem?
1. Start the sign-in flow.
2. Enter username and password for an account that uses two-step
verification/OTP.
3. Leave the app sitting there at the verification code screen for a while
(until the login session times out).
4. Enter valid verification code/OTP and submit. You'll be redirected back to
the username/password form.
5. Complete the sign in process successfully.
What is the expected output? What do you see instead?
Expected: either the web view closes or I see the OAuth grant permissions screen
Actual: I see my Google Account page (google.com/accounts)
What version of the product are you using? On what operating system?
r36, iOS 4.2 (8C134) in simulator.
Original issue reported on code.google.com by [email protected]
on 28 Mar 2011 at 5:06
What steps will reproduce the problem?
1. After being authenticated make a call to [GTMOAuthViewControllerTouch
removeParamsFromKeychainForName:kAppServiceName];
2. Create a new instance of GTMOAuthAuthentication *auth and call
- (void)login
{
if (![self.linkedIn canAuthorize]) {
self.linkedIn.callback = @"http://www.google.com/OAuthCallback";
GTMOAuthViewControllerTouch *vc;
vc = [[[GTMOAuthViewControllerTouch alloc] initWithScope:kAPIScope
language:nil
requestTokenURL:[NSURL URLWithString:kRequestTokenURL]
authorizeTokenURL:[NSURL URLWithString:kAuthorizeURL]
accessTokenURL:[NSURL URLWithString:kAccessTokenURL]
authentication:self.auth
appServiceName:kKeyChainKey
delegate:self
finishedSelector:@selector(viewController:finishedWithAuth:error:)]
autorelease];
[[self.appDel nav] pushViewController:vc animated:YES];
}
}
What is the expected output? What do you see instead?
Expected UIWebView which loads the login screen pushed to navigation stack.
What I see: UIWebView pushed and poped from navigation stack and auth object
obtaining access token without login
What version of the product are you using? On what operating system?
iOS
Please provide any additional information below.
It seems that auth object is retained within a library with all the associated
access tokens.
Here is my logout method:
- (void)logout
{
[GTMOAuthViewControllerTouch removeParamsFromKeychainForName:kKeyChainKey];
self.auth = nil;
}
Original issue reported on code.google.com by [email protected]
on 26 Sep 2012 at 9:30
GTMOAuth/GTMOAuthAuthentication.m:986:18: 'CFURLCreateStringByAddingPercentEscapes' is deprecated: first deprecated in iOS 9.0 - Use [NSString stringByAddingPercentEncodingWithAllowedCharacters:] instead, which always uses the recommended UTF-8 encoding, and which encodes for a specific URL component or subcomponent (since each URL component or subcomponent has different rules for what characters are valid).
GTMOAuthAuthentication.m:998:29: 'stringByReplacingPercentEscapesUsingEncoding:' is deprecated: first deprecated in iOS 9.0 - Use -stringByRemovingPercentEncoding instead, which always uses the recommended UTF-8 encoding.
GTMOAuthViewControllerTouch.m:249:44: 'applicationFrame' is deprecated: first deprecated in iOS 9.0 - Use -[UIScreen bounds]
GTMOAuthViewControllerTouch.m:616:37: 'shouldAutorotateToInterfaceOrientation:' is deprecated: first deprecated in iOS 6.0
GTMHTTPFetcher.m:381:44: 'initWithRequest:delegate:startImmediately:' is deprecated: first deprecated in iOS 9.0 - Use NSURLSession (see NSURLSession.h)
What steps will reproduce the problem?
1. Create GTMOAuthAuthentication object with signature HMAC_SHA1, consumerKey
and privateKey.
2. Create NSMutableURLRequest setup to query unauthorised API calls
3. Perform authorizeRequest on GTMOAuthAuthentication object with object from
step 2.
What is the expected output? What do you see instead?
I expect GTMOAuthAuthentication to add oauth headers:
oauth_consumer_key, oauth_version, oauth_signature_method, oauth_timestamp,
oauth_nonce and oauth_signature
What version of the product are you using? On what operating system?
Revision r68 from Apr 9, 2013 on Mac OS.
Please provide any additional information below.
Fix is to change current implementation of authorizeRequest:
- (BOOL)authorizeRequest:(NSMutableURLRequest *)request {
NSString *token = [self token];
if ([token length] == 0) {
return NO;
} else {
if ([self shouldUseParamsToAuthorize]) {
[self addResourceTokenParamsToRequest:request];
} else {
[self addResourceTokenHeaderToRequest:request];
}
return YES;
}
}
to the following lines:
- (BOOL)authorizeRequest:(NSMutableURLRequest *)request {
// NSString *token = [self token];
// if ([token length] == 0) {
// return NO;
// } else {
if ([self shouldUseParamsToAuthorize]) {
[self addResourceTokenParamsToRequest:request];
} else {
[self addResourceTokenHeaderToRequest:request];
}
return YES;
// }
}
Original issue reported on code.google.com by [email protected]
on 12 Apr 2013 at 11:35
arlyss engebretson owner and director of services no change can be made to
these files after returned to maker arlyss m engebretson
Original issue reported on code.google.com by [email protected]
on 6 Jul 2014 at 8:16
Attachments:
What steps will reproduce the problem?
1.- (GTMOAuthAuthentication *)myCustomAuth saved this method in AppDelegate
Class.
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Apr 2012 at 9:00
What steps will reproduce the problem?
1..- (GTMOAuthAuthentication *)myCustomAuth saved this method in AppDelegate
Class.
2. GTMOAuthAuthentication *auth = [mainDelegate myCustomAuth]; is used to check
for authe
3.when I check if(auth)
{
BOOL didAuth = [GTMOAuthViewControllerTouch authorizeFromKeychainForName:@"iphoneapp" authentication:auth];
}
and make url call not able to access tokens again
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 26 Apr 2012 at 9:09
What steps will reproduce the problem?
1. Go through normal authorization, and store the persistenceResponseString
from the GTMOAuthAuthentication object in the keychain.
2. In new attempt at authorization, read back string from keychain and call
setKeysForReponseString on a new GTMOAuthAuthentication object, then call
'canAuthorize'. This will always fail so sign in is required again.
What is the expected output? What do you see instead?
canAuthorize should return YES but returns NO.
What version of the product are you using? On what operating system?
latest trunk of gtm-oauth, in iOS 6.1.3
Please provide any additional information below.
From what I can see, the code in setKeysForResponseDictionary calls 'setToken'
should be changed to 'setAccessToken' so that the _hasAccessToken gets set to
YES as well.
Original issue reported on code.google.com by [email protected]
on 14 Aug 2013 at 10:35
Cannot compile due to ARC issues
Original issue reported on code.google.com by [email protected]
on 10 Nov 2014 at 8:15
// this is the designated initializer
- (id)initWithScope:(NSString *)scope
language:(NSString *)language
requestTokenURL:(NSURL *)requestURL
authorizeTokenURL:(NSURL *)authorizeURL
accessTokenURL:(NSURL *)accessURL
authentication:(GTMOAuthAuthentication *)auth
appServiceName:(NSString *)keychainAppServiceName
resourceBundle:(NSBundle *)bundle;
The language parameter to -initWithScope is dropped on the floor. It should be
passed along to OAuth if possible. Twitter, for example, would seem to support
a language parameter:
https://dev.twitter.com/discussions/2741
Original issue reported on code.google.com by [email protected]
on 18 Apr 2014 at 3:29
Here are the changes necessary:
signInToTwitter:
NSURL *requestURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/request_token"];
NSURL *accessURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/access_token"];
NSURL *authorizeURL = [NSURL URLWithString:@"https://api.twitter.com/oauth/authorize"];
doAnAuthenticatedAPIFetch:
NSString *urlStr = @"https://api.twitter.com/1.1/statuses/home_timeline.json";
Original issue reported on code.google.com by [email protected]
on 18 Apr 2014 at 3:25
>>What steps will reproduce the problem?
1. use an invalid Twitter Key
2. push the GTMOAuthViewControllerTouch
3. try to dismiss it when you get the error, it almost never works(have seen it
work)
>>What is the expected output?
The view should be dismissed
>>What do you see instead?
If I dismiss the view with
[viewController removeFromParentViewController];
[viewController viewWillDisappear:YES];
nothing happens and I'm stuck with a white UIWebview most of the time...
>>What version of the product are you using? On what operating system?
iOS
>>Please provide any additional information below.
This seems to actually be a problem with dismissing a view controller with a
UIWebview.
If I delay the dismiss with a
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
[viewController removeFromParentViewController];
[viewController viewWillDisappear:YES];
});
then it works... but this is a crappy way to deal with a race condition in
someone else's library...
Original issue reported on code.google.com by [email protected]
on 16 Jan 2012 at 4:36
I have a legacy native iOS app that depends on the pod
'gtm-oauth' '0.0.1'
The podspect at cocoapods is outdated as it points to http://code.google.com/p/gtm-oauth.
Please add a podspec to this project.
What steps will reproduce the problem?
1. Build & run
2. Complete OAuth login to Twitter
3. Crash
See:
https://groups.google.com/forum/#!topic/gtm-oauth/N6jlOpL9k5g
This line of code causes the crash:
- (void)destroyWindow {
// no request; close the window (but not immediately, in case
// we're called in response to some window event)
[[self webView] stopLoading:nil]; <--- *** causes the crash
. . .
Here's a stack trace of the crash:
2014-04-17 14:55:44.000 -0- Exception handler: Uncaught system exception:
signal 11
2014-04-17 14:55:44.084 -0- Stack Trace:
#0 ExceptionHandling 000140735561141361
NSExceptionHandlerUncaughtSignalHandler()
#1 libsystem_platform.dylib 000140735578928554 _sigtramp()
#2 ?? 000000004660728840
+[SyncableObjectMO_SyncableObject_ _PFPlaceHolderSingleton]
#3 WebCore 000140735485213608
_ZN7WebCore14DocumentLoader14maybeLoadEmptyEv()
#4 WebCore 000140735485213103
_ZN7WebCore14DocumentLoader24startLoadingMainResourceEv()
#5 WebCore 000140735485834990
_ZN7WebCore11FrameLoader33continueLoadAfterNavigationPolicyERKNS_15ResourceReque
stEN3WTF10PassRefPtrINS_9FormStateEEEb()
#6 WebCore 000140735485834064
_ZN7WebCore11FrameLoader37callContinueLoadAfterNavigationPolicyEPvRKNS_15Resourc
eRequestEN3WTF10PassRefPtrINS_9FormStateEEEb()
#7 WebCore 000140735485833877
_ZN7WebCore14PolicyCallback4callEb()
#8 WebCore 000140735485833760
_ZN7WebCore13PolicyChecker29continueAfterNavigationPolicyENS_12PolicyActionE()
#9 WebKit 000140735616624699
-[WebFramePolicyListener receivedPolicyDecision:]
#10 CoreFoundation 000140735597009900 __invoking___()
#11 CoreFoundation 000140735597009492 -[NSInvocation
invoke]
#12 CoreFoundation 000140735597676006 -[NSInvocation
invokeWithTarget:]
#13 CoreFoundation 000140735597478340 ___forwarding___()
#14 CoreFoundation 000140735597477752
_CF_forwarding_prep_0()
#15 WebKit 000140735616622308
_ZN20WebFrameLoaderClient39dispatchDecidePolicyForNavigationActionEMN7WebCore13P
olicyCheckerEFvNS0_12PolicyActionEERKNS0_16NavigationActionERKNS0_15ResourceRequ
estEN3WTF10PassRefPtrINS0_9FormStateEEE()
. . .
To fix the crash, comment out the -stopLoading line.
Original issue reported on code.google.com by [email protected]
on 18 Apr 2014 at 3:20
What steps will reproduce the problem?
1. Create a GTMOAuthWindowController with a request url:
"http://localhost:8888/oauth/request"
2. Bring up the modal sign-in sheet
What is the expected output? What do you see instead?
You get an error saying host "localhost8888" not found.
What version of the product are you using? On what operating system?
r25 / OSX
Please provide any additional information below.
"addParams:toRequest:" omits the ":" when re-assembling the url.
see attached patch.
Original issue reported on code.google.com by [email protected]
on 2 Oct 2010 at 6:24
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.