I'm storing the userId and password generated by the account/create
endpoint in the browser's localStorage
, in order to use them for all subsequent logins.
However, in case the localStorage gets cleared, I still want to be able to retrieve the account history, favorites, etc, so simply logging in with a new account doesn't seem to be the right way to go.
Is there any way to identify the user and retrieve their history/favorites even if the userId/password
changes?
If credentials are stored in localStorage, and the localStorage is cleared there is no way to restore the account though the Glympse REST API.
If the account is linked through another service then it is possible to manually restore the account. Currently the services linked to Glympse are Facebook, Twitter, and Google+.
You can also restore an account through text message or email.
There is no API request for retrieving account information by other means (for example, a database query for collections matching "_id" or "email_address"), because that would be out of the scope of the Glympse REST API's purpose.