Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expired Token issue? #12

Open
amcglathery opened this issue Jul 2, 2012 · 13 comments
Open

Expired Token issue? #12

amcglathery opened this issue Jul 2, 2012 · 13 comments
Labels

Comments

@amcglathery
Copy link
Owner

Sometimes, if a user has not logged out, they cannot get to the login page at all, or any page that requires login. (They get an EDAM user exception)

@mjrussell
Copy link
Collaborator

Omg I got that bug yesterday. Ridiculously frustrating. Did you get it locally or on heroku?

@amcglathery
Copy link
Owner Author

heroku, got around it by going to /about

@mjrussell
Copy link
Collaborator

Same! We need to fix that ASAP. Work tonight? If you get an exception could
you redirect to login?

On Mon, Jul 2, 2012 at 2:13 PM, Andrew McGlathery <
reply@reply.github.com

wrote:

heroku, got around it by going to /about


Reply to this email directly or view it on GitHub:

#12 (comment)

@amcglathery
Copy link
Owner Author

I can't really work much tonight, but it is really easy to redirect to login on an exception. The one problem is reproducing it...

@mjrussell
Copy link
Collaborator

Right...I don't remember the line # either.

On Mon, Jul 2, 2012 at 2:18 PM, Andrew McGlathery <
reply@reply.github.com

wrote:

I can't really work much tonight, but it is really easy to redirect to
login on an exception. The one problem is reproducing it...


Reply to this email directly or view it on GitHub:

#12 (comment)

@amcglathery
Copy link
Owner Author

My guess is that it is from trying to se an expired auth token, so just putting try except statements around all of the calls to Evernote should do it.

@akhaku
Copy link
Collaborator

akhaku commented Jul 2, 2012

I've had this issue before with facebook tokens, it's probably the same issue. I'm assuming you're still working on sandbox? The fix is to refresh the token (there's an API call for that) when there's some amount of time left such as 1 day. Store the token expires time in the database and use that.

@mjrussell
Copy link
Collaborator

We are on production now! Due date is tonight. Can you refresh an expired
token?

On Mon, Jul 2, 2012 at 4:16 PM, Ammar Khaku <
reply@reply.github.com

wrote:

I've had this issue before with facebook tokens, it's probably the same
issue. I'm assuming you're still working on sandbox? The fix is to refresh
the token (there's an API call for that) when there's some amount of time
left such as 1 day. Store the token expires time in the database and use
that.


Reply to this email directly or view it on GitHub:

#12 (comment)

@akhaku
Copy link
Collaborator

akhaku commented Jul 2, 2012

I don't know, you might have to refresh it before it expires. Use the expires_time to check whether it will expire within 24 hours. I'm gonna see if I can find the API call...

@akhaku
Copy link
Collaborator

akhaku commented Jul 2, 2012

Nevermind, according to seth, you can't refresh tokens. You shouldn't have this problem with production tokens though, they're valid for a year. It'll be a year before this breaks...right?

@mjrussell
Copy link
Collaborator

Even on the production our token says only good for 1 day. I checked and
it's set right in the Auth call. Could it have been a mistake by Evernote?
It's right in the settings file I have
On Jul 2, 2012 4:30 PM, "Ammar Khaku" <
reply@reply.github.com>
wrote:

Nevermind, according to seth,
you can't refresh tokens. You shouldn't have this problem with production
tokens though, they're valid for a year. It'll be a year before this
breaks...right?


Reply to this email directly or view it on GitHub:

#12 (comment)

@akhaku
Copy link
Collaborator

akhaku commented Jul 2, 2012

Remove your current token from the database and re-authorize with Evernote. It should get you a new one that's valid for a year

@mjrussell
Copy link
Collaborator

I think I found the issue. Google Instant destroys the page by somehow
skipping the authentication. I found where the exception is and I'll just
throw them back to the login page.

On Mon, Jul 2, 2012 at 5:16 PM, Ammar Khaku <
reply@reply.github.com

wrote:

Remove your current token from the database and re-authorize with
Evernote. It should get you a new one that's valid for a year


Reply to this email directly or view it on GitHub:

#12 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants