particle-iot/spark-cli

Use existing access token for spark login

Closed this issue · 1 comments

When you perform spark logout and choose not to delete the access token, it is still stored in your json config file.

However, upon logging in, Spark-cli grabs a new access token instead. Seems a little tricky though since you might want to login another account and not use the currently saved access token.

Might be able to use the username field in the json config file to see if there's a match but typos are not handled by this..hmm..

I'm suggesting to auto-delete the access token upon spark logout but @dmiddlecamp will need to enable the endpoint that allows an access token to authorise itself to delete itself.....