Can't login to panel with MAMP + CodeKit

Hey there,

I just installed a fresh version of Kirby 3 on my local machine and I did the installation with MAMP. When I try to login through the CodeKit generated host, which works together with MAMP it’s not working. When I try the same with the normal localhost, everything works. In the console I get this error:

Failed to load resource: the server responded with a status of 400 (Bad Request)
onError — app.js:1:235271

{status: "error", exception: "Kirby\\Exception\\InvalidArgumentException", message: "Invalid CSRF token", key: "0", file: "19_kirby/kirby/config/api/routes/auth.php", …}

How can I solve this?

Are you trying to log in using the codekit url? so something.local:5757 (or whatever)?

Yes, I because I’m highly addicted to the auto refresh feature :joy:

Then that won’t work.

Issue already came up last week I believe.
There’s something in the codekit url scheme that is messing with the panel and the api is throwing errors. Don’t know if there’s a solution at the moment.

1 Like

Ah! I did a search but did not find any topics about that. Had the same issue when I tried to install the panel through the CodeKit URL.

So no auto refresh in the panel ATM :frowning:

Thanks for your answer Manuel!

Can you give this a try: try set the url option inside the config.php file
So something like 'url' => 'http://local.debuging.com', (with obviously the url of your site :slight_smile: )

I just tested this and everything inside the panel seems to work as expected.