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

userAccessTokenParser: failed to parse #5

Open
ronslow opened this issue Jul 4, 2012 · 5 comments
Open

userAccessTokenParser: failed to parse #5

ronslow opened this issue Jul 4, 2012 · 5 comments

Comments

@ronslow
Copy link

ronslow commented Jul 4, 2012

I got the following after logging in via Facebook

Internal Server Error

userAccessTokenParser: failed to parse "access_token=AAADPFaYO8UUBAGqmiKEoC6hNfxD22kc8ZAXZA3Occ1Nf9p1I6pJ7NxYXFwGhFJdjgA1tfVXVxbi8pbnIe42H4sUkwwE3kZD"

Any ideas?

Thanks

Robert

@meteficha
Copy link
Member

That access token seems to be coming without an expiration time. Are you using server-side or client-side authentication?

@ronslow
Copy link
Author

ronslow commented Jul 4, 2012

Server-side

@ronslow
Copy link
Author

ronslow commented Jul 4, 2012

Yes, no expiration time because the App Setting allows this particular App to access the facebook account at any time. May need an upgrade to userAccessTokenParser to allow for no expiration time?

@meteficha
Copy link
Member

So you're using the offline access permission?

The real problem is that currently the UserAccessToken constructor takes a UTCTime for expiration which would need to be changed to Maybe UTCTime. Since offline access is being deprecated I'm not too fond of refactoring a lot of code just for this use case.

A better compromise may be to just set the expiration time to the far, far future whenever it's not found. I don't like the silent nature of this fix, though.

Thoughts?

@ronslow
Copy link
Author

ronslow commented Jul 5, 2012

That's got me thinking. My FB App needs offline access to read status updates - but I do this outside Yesod.

I am using auth-fb for a different purpose, namely to provide log in credentials which, as you say, should always be time limited. I think the answer in my case is to have another FB app, without offline access, which is used only to log in. That will solve the issue for me.

However, the purist in me says that the expiration time is definitely a Maybe!

Robert

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

No branches or pull requests

2 participants