justarandomgeek / vscode-factoriomod-debug

Factorio Mod Tool Kit
Other
100 stars 24 forks source link

Suggestion: Trim whitespace off API keys #117

Closed Wiwiweb closed 4 months ago

Wiwiweb commented 5 months ago

I did a dumb and got confused for an hour or so.

When you triple click the API key on the factorio.com "Your new API key has been created" screen and then ctrl+c, it gets a whitespace at the beginning and the end of the API key. Which then causes an invalid API key error.

There's a "copy to clipboard" button on that page too so it is my fault for sure but triple click copy is a habit and the selection looks correct without pasting the result to a cleartext box to verify it.

I'd recommend trimming the whitespaces off the API key when it is input, to avoid this easy user mistake.