Comments (8)
Hi @walkman
I have only encountered this problem when the encryption key is changed after a token has been obtained. As the decryption will fail, so will unserializing the token.
Please confirm that the encryption key was not changed between requests and I will investigate further. Commit 91c6e5a checks for failed unserialisation and throws an Exception which will allow you to handle this error more gracefully.
from dropbox.
Yes, I cahnged it manually to test it. So it will never come up when I request token from a new user ?
from dropbox.
Thanks for the change ! Anyway, your code is very clean and easily usable ! ;-)
from dropbox.
Hi @walkman
This issue will still occur if you encrypt tokens with one key and try to decrypt using another. This means that any change to your encryption key will mean that tokens issued before that change will no longer work. I will look into ways we can handle this, but for now please bear this in mind.
Thank you for the compliments!
Regards,
Ben
from dropbox.
I did not looked into details yet, does it mean you use only one key for every user? I tought the way to use your scripts that I generate every user a unique key and assign to them, and when the user log in I use that key. Am I right ?
from dropbox.
Hi @walkman
It's your decision whether you use a unique encryption key per user or use a shared key. In both scenarios the above applies - you must decrypt with the same key that you encrypted the token with. If at any point a unique/shared key is changed, any tokens encrypted using that key will be useless as you will be unable to decrypt them.
from dropbox.
ok, got it thanks !!
from dropbox.
Hi @walkman
No problem, glad I could help :)
from dropbox.
Related Issues (20)
- Request token not found After allow OAuth. HOT 2
- files starts with symbol @ not uploading. HOT 1
- The cURL OAuth consumer requires the cURL extension HOT 2
- Problem with putStream HOT 3
- Warning: Unexpected character in input: '\' (ASCII=92) state=1 HOT 2
- Can ConsumerAbstract->getRequestToken be public? HOT 1
- Forbidden error HOT 4
- Fatal Error HOT 3
- Examples not working HOT 2
- pufile.php example not working : Invalid file extension
- How to deploy this into my own server? Error:'Couldn't resolve host 'api.dropbox.com'' HOT 3
- "This app has been disabled." HOT 3
- Installation Instructions for Acquia Drupal ??
- How to set to the userID dynamically for each user? HOT 1
- Apps/TestFolder rights question HOT 1
- Need Help with Href Link
- Connect via token (upload file to one account) HOT 2
- How to use this library without Composer? HOT 2
- Migration to API v2
- Could not resolve host: api-content.dropbox.com HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dropbox.