hoodiehq / hoodie-account-client

:dog: Account client API for the browser
https://hoodiehq.github.io/hoodie-account-client
Apache License 2.0
11 stars 24 forks source link

if not signed in, hoodie.account.destroy() should still work and delete all user’s data #110

Closed gr2m closed 7 years ago

thomasjinlo commented 7 years ago

Hello, I'm thinking about tackling this issue. It occurs to me that if a user is not signed in the session should be invalid, thus it makes sense not to send a delete request. Would wrapping the request in a conditional which checks session validity be a good approach? Thanks!

gr2m commented 7 years ago

All yours @thomasjinlo 👍 By the way don’t forget to sign up for https://hacktoberfest.digitalocean.com ;)

I would suggest we check with .isSignedIn(). If it returns false, don’t send the request, do as if id would have been successful

thomasjinlo commented 7 years ago

Thanks so much :)