Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

Can we make the oauth faster?

oauth

  • Please log in to reply
4 replies to this topic

#1 berryboy

berryboy

  • Pip
  • Title: Member
  • Group: Members
  • 42 posts

Posted 20 September 2012 - 10:17 AM

I'm sharing what I discovered with your team and developers for suggestion.
These weeks, I've worked on Evernote OAuth authentication of my iPhone app. Since the username/password authentication is going to be deprecated on the 1st November.

After move to OAuth, I can easily noticed that login page took very long time to load every time I launched the app.
So, I tested Evernote login page with a profiler (on computer) and this is what I discovered.
Posted Image
Loading javascript jQuery take 4 seconds and overall load time is almost 7 seconds. I had this test on coffee shop wifi, thus, I believed that it will be worse if the mobile apps are on unreliable network such as edge or 3G.

I think this is serious problem for third-party apps. Imagine that users launch an iPhone app for the first time, you require them to login, but they have to wait for login page (10+ seconds) before they can type anything.


PS. For comparison this's Facebook authentication page.

Posted Image

#2 magpoc

magpoc

  • Pip
  • Title: Member
  • Group: Members
  • 15 posts

Posted 22 October 2012 - 08:07 AM

Have there been any progress?
I also think this should be solved.
For the time being, I diddled the ENOAuthViewController.m to show a indicator while loading the web form.

1) Add a indicator property.
@property (nonatomic, retain) UIActivityIndicatorView *loadIndicator;
@synthesize loadIndicator = _loadIndicator;

2) Release the indicator in dealloc.
[_loadIndicator release];

3) Add two methods to show and hide the indicator at the center of the webView.

- (void)showIndicator
{
  UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
  indicator.center = CGPointMake(self.webView.bounds.size.width / 2, self.webView.bounds.size.height / 2);
  [self.webView addSubview:indicator];
  [indicator startAnimating];
  self.loadIndicator = indicator;
  [indicator release];
}

- (void)hideIndicator
{
  [_loadIndicator removeFromSuperview];
  self.loadIndicator = nil;
}

4)Call showIndicator in webViewDidStartLoad: and call hideIndicator in both webViewDidFinishLoad: and webView:didFailLoadWithError:
ENOAuthViewController is not implemented webViewDidStartLoad: and webViewDidFinishLoad: so I added these two delegate methods.

Of course this is not a fundamental solution and this way requires me to modify the original source code every time the SDK is updated.

#3 Martin Packer

Martin Packer

  • PipPipPipPipPip
  • Title: Browncoat
  • Group: Members
  • 562 posts

Posted 22 October 2012 - 10:53 AM

You'd have to wonder what jQuery was actually being used for - normally for web page manipulation. But finding some particular DOM Node might be doable without loading jQuery.

#4 Hemant G

Hemant G

  • Pip
  • Title: Member
  • Group: Members
  • 2 posts

Posted 06 August 2013 - 08:21 AM

Yes, I've also faced the same problem on Android. It takes a lot time for the login page to load (after the loading dialog disappears). Users think that there is something wrong with the app. We need to solve this issue as soon as possible.



#5 Mustafa

Mustafa

  • Title: Browncoat
  • Group: Evernote Employee
  • 348 posts

Posted 06 August 2013 - 05:20 PM

We are looking into this. We have added some logs to the iOS SDK. If you can send us the log file (when OAuth is slow), that will be useful.







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote