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

[Auth] access_token expires sooner than said by expires_in and expires_at #24

Closed
solsticedhiver opened this issue Jul 18, 2016 · 10 comments
Assignees
Labels

Comments

@solsticedhiver
Copy link
Contributor

solsticedhiver commented Jul 18, 2016

If one get an acess token with the REST API at https://cloud.xee.com/v3/auth/access_token

One get as result something like ```

{
    "access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "token_type":"bearer",
    "expires_in":13060800,
    "expires_at":1481904143,
    "refresh_token":"yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"
}

1481904143 means 2016-12-16 at 17:02:23
But the token expires just minutes or an hour after creation.

13060800 means 151 days

It is not an error in documentation but implementatoin but there is nowhere to mention that.

@solsticedhiver solsticedhiver changed the title expiry of access token is wrong in expires_in and expires_at between reality of expiry of the token access_token expires sooner than said by expires_in and expires_at Jul 18, 2016
@josephpage
Copy link
Contributor

josephpage commented Jul 19, 2016

Oh ! ... I thought this was a bug of oauth2 gem.

To temporary bypass it, I catch the EXPIRED_TOKEN error from Xee API, then
refresh tokens and retry the request.

Wish Xee will fix it soon.

@alexjomin
Copy link
Contributor

Hi Guys,

Thank you for your feedback. We are aware of this issue, we are working on it !

@alexjomin alexjomin added the bug label Jul 19, 2016
@alexjomin alexjomin self-assigned this Jul 19, 2016
@josephpage
Copy link
Contributor

Thank you for working on it.
Can you communicate a patch release date ?

@qk7b
Copy link
Contributor

qk7b commented Aug 8, 2016

No date right now but we've planned to fix it this week !

@qk7b qk7b changed the title access_token expires sooner than said by expires_in and expires_at [Auth] access_token expires sooner than said by expires_in and expires_at Aug 9, 2016
@qk7b
Copy link
Contributor

qk7b commented Aug 9, 2016

We found something. A fix is in progress, we'll keep you informed !

@vosmont
Copy link

vosmont commented Aug 9, 2016

Great news !

@qk7b
Copy link
Contributor

qk7b commented Aug 9, 2016

The bug has been fixed!

Summary:

  • Now, all the tokens will expire after 48h (including the tokens provided before this post)
  • Once refreshed, the new ones will be ok !

We made a post about it

@qk7b qk7b closed this as completed Aug 9, 2016
@josephpage
Copy link
Contributor

We will open the Champagne !

@vosmont
Copy link

vosmont commented Aug 11, 2016

I can confirm that it works well now.
The tokens are valid for 48h (it was 1h)... much more suitable for an Home Automation system !

@qk7b
Copy link
Contributor

qk7b commented Aug 11, 2016

Thank you for the feedback :)

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

5 participants