speckleworks / SpeckleCore

Check a brand new Speckle at: https://github.com/specklesystems
https://speckle.systems
MIT License
38 stars 17 forks source link

Stop serialising token in client #75

Closed didimitrie closed 5 years ago

didimitrie commented 6 years ago

Step 0:

Actual Behaviour

They use the creator's api token (they get serialised with it).

Affected Projects

Will propagate through Speckle Rhino and co, but ideally on the dev side changes will be minimal.

didimitrie commented 5 years ago

New behaviour:

Client, when deserialising, will search through any existing accounts for one matching the server's api as well as the email address used (in case duplicate accounts on same computer). If one is found, it's going to use that.

If none are found, it will search for any account present at the client's server url. If some are found, it will use the first one. If no accounts are found at that specific server, it will throw an error.

Upon successful deserialisation, clients are ad-hoc migrated to incorporate the user's email instead of their token in the serialisation process.