Ilyas-Codes / eCourse

A self-hosted SPA to simplify course creation and management

Home Page:https://ecourse.pockethost.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fail to authenticate with Password

Orohym opened this issue · comments

Hello,

I tried to install eCourse with the docker-compose file provided in Issue #3. I am attempting to log in with a user created from the admin dashboard; however, it's failing. Here are the steps I have followed:

  1. Go to ip_address:port/_ to access the admin panel.
  2. Create a user. I attempted this both with and without an email (email option set to disabled).
  3. Go to ip_address:port.
  4. Click on 'Login/Get access.'
  5. Enter the user/password created in step 2.
  6. Receive error message: 'Login failed. Please check your credentials and try again.

I checked the networking tab in my browser and noticed that it's attempting to reach 'https://ecourse.pockethost.io/api/collections/users/auth-with-password' (see screenshot).
ecourse
Moreover, when I am logging in with the demo user/password, the login is successful. However, the courses I have created in the admin panel are not showing up.

Web browser : Firefox

The Dockerfile mentioned in the issue is outdated. I'll update it when I have the time. In the meantime, I recommend deploying it manually by following the steps in the README.

also, courses that don't have any lesson content added to them won't show up, even if they're assigned to a user. so, make sure to add at least one lesson to a course from the lessons collection for it to show up.

another note, there is only one user in the hosted demo (ecourse.pockethost.io) username: ilyas and password: ecourse123 obviously, if you're trying to login with different credentials, the login is going to fail.

wait I missed the last part, from what I understood, I think you're trying to use ecourse.pockethost.io as your own frontend and expect it to serve the data you created in the PB admin dashboard, well that's not going to work, you need to serve your own frontend locally using vite. it's all in the README.

Ok thank you.
Just to clarify, I am not trying to use ecourse.pockethost.io as front end. The deploy container is using it by "default" when I try to log in locally. As you can see in the screenshot.

I have replicated this problem using the deployment instructions while editing the docker file. Can't login with any user I create

@grenskul can I see the docker file you used?

It's not a thing yet. I'm just deploying using your instructions in the Readme.

did you set the VITE_PROD_PB_URL env variable?

@grenskul you'd need to add the URL of your hosted PB instance to VITE_PROD_PB_URL the frontend needs to know where to send the requests to.

Same behavior .
Logs show
image

It looks like password login is disabled by default.

Wait got it . had an extra EOL simbol cause of editing linux files in windows .

Great! I'll close the issue now.