PolyMC / PolyMC

A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)
https://polymc.org/
GNU General Public License v3.0
1.78k stars 275 forks source link

Can't input curseforge api key, only remove the official one #1613

Closed TheK0tYaRa closed 6 months ago

TheK0tYaRa commented 7 months ago

Operating System

Linux

Version of PolyMC

PolyMC 5.1

Version of Qt

Qt 5.15.11

Description of bug

The field should accept text inputs, but it only allows for deletion of text.

Steps to reproduce

  1. Fetch official api keys.
  2. Try deleting text from that field.
  3. try writing or pasting text into that field.

Suspected cause

I think someone mis-configured the field in qt-quick.

This issue is unique

HeyaGlitz commented 7 months ago

That field is checked for a regex pattern every time you input something, so that's why you can't write anything you want. The first 4 characters must be $2a$, after that you can write anything you want, but unless you have your own valid key, Curseforge features won't work properly with an invalid key.

LennyMcLennington commented 7 months ago

The field rejects invalid keys. You can't just type any random thing there.

TheK0tYaRa commented 7 months ago

Before you ask - no i did not check out the current git package from aur

TheK0tYaRa commented 7 months ago

The field rejects invalid keys.

Well it rejected the one from the api page in my profile too so idk. Literally couldn't paste it in.

TheK0tYaRa commented 7 months ago

The first 4 characters must be $2a$

Welp, the api key i got starts with nothing like that so... Maybe add a button that opens the page where own api key can be obtained?

binex-dsk commented 7 months ago

Where did you fetch it from? https://cf.polymc.org/api returns a key that starts with $2a$.

TheK0tYaRa commented 7 months ago

https://legacy.curseforge.com/account/api-tokens

TheK0tYaRa commented 7 months ago

I suppose it's a misunderstanding on my part about what api key is needed. But i still wish to know where can i obtain an api key linked to my account. If that's possible at least.

HeyaGlitz commented 7 months ago

You should apply for a key here. More info.

binex-dsk commented 7 months ago

FWIW using your own API key has strict limitations, only the official one is really any good. If you don't want to use the official one then stick to Modrinth and FTB.