#Savaged.us Importer API Key

1 messages · Page 1 of 1 (latest)

rustic ridge
#

It should be. It's saved as a client setting though.

twin sparrow
#

Weird. I'm running Foundry as an Electron app hosted on a Digitalocean instance. I put the key into the settings yesterday and it worked while I was logged in. I logged in today to grab updates to the player characters and it was gone again.

hard marsh
#

I've had it get wiped out from time to time, a while ago though. Never quite pinned down what the issue was,

#

hasn't happened (that I've noticed) for a bit

twin sparrow
#

@hard marsh Are you running v9?

hard marsh
#

this was a while back. Maybe even under v7, or early in v8

twin sparrow
#

Hmm...

rustic ridge
#

Under v7 I think it was using generic local storage rather than the module settings.

#

Yeah, it's set as a client setting.

game.settings.register(MODULE_NAME, "apiKey", {
        name: "Savaged.us API key:",
        hint: "To import characters and bestiary entries directly, please enter your Savaged.us API key.",
        type: String,
        default: '',
        scope: "client",
        config: true,
        onChange: async (value) => {
            if (!value || (value && await testConnection(value))) {
                ui.actors.render(true)
            }
        }
    })
#

I have no idea what would cause it to clear. Are you using ublock by any chance?

twin sparrow
#

If that's a Foundry module, no.

rustic ridge
#

No, it's a browser extension

#

meant to block ads

twin sparrow
#

Found what you're referring to. I'm not using uBlock, but I was using Firefox (no extensions except for Bitwarden - password manager).

#

Is it possible that it wouldn't keep the setting if I logged in with Firefox yesterday and then again with Vivaldi today? Does Foundry separate clients that way?

#

Because I was in Firefox yesterday. Today, when I saw it missing, I was using my usual browser (Vivaldi - Chromium based) since it was open.

#

Only thing on that is that, when I saw the problem yesterday, it occurred without switching browsers.

#

Just opened in Firefox now (since I added the API key back using Vivaldi) and the key was still there.

rustic ridge
#

It's stored on the specific browser and browsers don't share local storage

rustic ridge
#

And you're not using different browser profiles?

twin sparrow
rustic ridge
#

Ah, OK

twin sparrow
#

I figured Foundry stored settings and similar data in a persistent location (i.e. The data directory). That's scary that if I clear out my browser's local storage I'll lose all my Foundry settings. That seems like a poor architecture choice. Am I misunderstanding something about Foundry settings?

rustic ridge
#

I can see if I can store it at the world level without it being a field for everyone to see. I'm still sort of new to setting configurations honestly.

#

OK, so this is possible; however, I think the reason the original developer did this as a client/localstorage setting is because it is an API key and anyone with a GM role (whether accessed legitimately or not) can access the API key from any other client.

#

So it's a trade off: risk someone's API key getting stolen or inconveniently have to add it to your specific client once in a while.

#

I'd rather be a bit more cautious personally.

twin sparrow
#

No, I agree. I was just trying to figure out why it seemed to randomly get lost. Now I know it's not random, it's tied to my browser. What you said makes complete sense.

#

Thanks for the help!