schnick3rs / oath-card-builder

1 stars 1 forks source link

Storage #5

Open GabrielMPhi opened 2 years ago

GabrielMPhi commented 2 years ago

It's less of an "Issue" than a question. Where are the cards stored. I see that it's partly on LocalStorage, but I see that the share function let the card live outside this. I was curious if the cards were hosted somewhere and if so, if I could recover old cards I made.

YoungTeurus commented 2 years ago

It looks like the URL for sharing contains base64 encoded information about the whole card (that's why it's kinda long and ends with "=="). So the server probably doesn't contain any information about your cards.

Upd: Checked my theory. For example this URL https://oath-card-builder.herokuapp.com/share/eyJfX3R5cGUiOiJzaXRlIiwiaWQiOiJiV195IiwibmFtZSI6IlJhbmRvbSBTaXRlZWUiLCJyZXNvdXJjZXMiOjEsInJlbGljcyI6MiwiY2FwYWNpdHkiOjIsInJlbGljUmVjb3ZlckNvc3QiOiJAMSIsImltYWdlIjoiIiwidGV4dCI6IkNvb2whIiwiY3JlZGl0cyI6IldvdyIsInNwZWNpYWwiOiIifQ== contains data about this card (after decoding using something like this site): {"__type":"site","id":"bW_y","name":"Random Siteee","resources":1,"relics":2,"capacity":2,"relicRecoverCost":"@1","image":"","text":"Cool!","credits":"Wow","special":""} You can clearly see everything is in there.