apioo / fusio

Open source API management platform
https://www.fusio-project.org
Apache License 2.0
1.85k stars 221 forks source link

Can't log in - Could Not Authenticate #581

Open nsherzog opened 4 days ago

nsherzog commented 4 days ago

Hello,

I installed a fresh install of Fusio. I ran both bin/fusio migrate and bin/fusio adduser without errors. When I go to login to /apps/fusio I get the error "Could Not Authenticate."

I noticed a couple of errors in the javascript console:

I saw in a number of other posts that mod_rewrite may be a culprit. However I've verified that it's definitely turned on and I have all the RewriteCond/RewriteRule lines in my .htaccess file. Obviously something's not working but I'm not sure where to look. Assistance appreciated.

chriskapp commented 4 days ago

Hi @nsherzog can you show me the log/app.log file and also the general php error logs.

nsherzog commented 4 days ago

Hi. Thanks for your quick response. There's nothing showing up as errors in either of those logs. It's baffling.

nsherzog commented 4 days ago

Good morning. I should add that I don't have admin control over the server. The server is running php v8.2.2. I've compared the base site config and my .htaccess file against what's recommended in the docs (and what's running on my test server which works great btw) and the only line that's different is AllowOverride. The docs say this should read "AllowOverride All" where as on the server it reads "AllowOverride Options AuthConfig FileInfo Indexes Limit." According to the Apache manual these lines are effectively the same? Maybe they're not? Maybe I'm looking in the wrong place for what is wrong.

chriskapp commented 3 days ago

ok, I have just noticed that the public/ url is available s. https://api.coremarketplace.org/public/apps/fusio

do you have created a fitting virtual host where the DocumentRoot points to the public/ folder s. https://docs.fusio-project.org/docs/installation/apache

Also it looks like the Fusio APP_URL config is not correct since it it contains the public/ part.

nsherzog commented 3 days ago

Yeah - I was suspicious that the server document root setting wasn't working as advertised, so I removed the document root setting and reinstalled and left everything at default. I was hopeful but it still didn't let me log in.

I have since reset the directory root to 'public' and adjusted the .env file to fix the URL roots and fixed the the index.html in the /public/apps/fusio directory to fix that URL root as well. Now I can get all the way up to the actual login screen, but I still can't login. Same error as before. Nothing is showing up in either the log/app.log or the server error_log

nsherzog commented 2 days ago

So here's a thought: is it possible that there's something wrong with my admin account? I used the bin/fusio adduser command to add it and it appears to be in the database. When I do a simple auth request to my test fusio server (working) using /consumer/login [as outlined at https://docs.fusio-project.org/docs/concepts/authorization] I get a working token. When I try the same thing against the problem fusio server, I get an 'access denied' error.