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

Can't update box #373

Open
noerw opened this issue Oct 31, 2020 · 4 comments
Open

Can't update box #373

noerw opened this issue Oct 31, 2020 · 4 comments
Labels

Comments

@noerw
Copy link
Member

noerw commented Oct 31, 2020

Expected Behavior

I can change properties of my box in the dashboard

Actual Behavior

The API responds to PUT /boxes/:id with "422 Unprocessable Entity":

"message": "Validation failed: Path `access_token` is required."

After making the request, I am logged out.

Environment

  • OS: Write here
  • Browser & Version: Write here
@noerw noerw added the bug label Oct 31, 2020
@ubergesundheit
Copy link
Member

/cc @felixerdy @umut0

@felixerdy
Copy link
Member

You can go into your settings and generate a new access_token for your senseBox

@noerw
Copy link
Member Author

noerw commented Nov 3, 2020

@felixerdy Thanks for the hint, thats new to me. Would be good to let users know that boxes can only be updated when setting an access_token first.

You can go into your settings and generate a new access_token for your senseBox

But I don't want to (as then I have to reflash the sensebox, and currently have no access to the physical box) ;)

Also it's weird that the managing user-account would use a box-specific access token, and failing to provide that invalidates the user account access token? Something seems fishy there

@felixerdy
Copy link
Member

You are right. There is definitely still an issue that came from the usage of the access_token. We only observed that issue with boxes that had been registered some years ago that don't have an access_token yet. We still have to do the migration of old boxes in the database (i.e. adding an access_token).

Don't worry, if you just generate a new access_token, you won't need to update your box as long as you don't enable the authentication feature in the checkbox above

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