instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.4k stars 2.42k forks source link

[AUTH] Authlogic Validation Error: You did not provide any details for authentication. #2354

Open osetu opened 1 month ago

osetu commented 1 month ago

Summary:

Hi, I'm building CanvasLMS locally in Production Start mode. ※OS: Ubuntu 20.04 ※AP Server: Apache2 + Passenger

Last December(2023/12), I built CanvasLMS locally for my first time using the master branch at that time, and it has been working properly.

I am trying to build another environment using the same resources and the same procedures (I think) this month(2024/5). However, when I tried to login to the new CanvasLMS with the email address and password that I set during the DB Initial Setup, I got an "Invalid Authentication Token" error.

I have been struggling for 3 days but haven't resolve this. I have attached the error log(found in log/production.log). If anyone got any idea, could you please... tell me the possible cause of the error? I am a very beginner about Ruby.

Processing by Login::CanvasController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"tokenWasEmpty", "redirect_to_ssl"=>"1", "pseudonym_session"=>{"unique_id"=>"myemail@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"0"}} [AUTH] Authlogic Validation Error: You did not provide any details for authentication. [AUTH] Authlogic Failed Find [AUTH] inital load: pseud -> , user -> [AUTH] final user: SQL AuthenticationProvider Load (0.5ms) SELECT "authentication_providers".* FROM "public"."authentication_providers" WHERE "authentication_providers"."account_id" = 1 AND "authentication_providers"."auth_type" = 'canvas' AND (workflow_state <> 'deleted') ORDER BY "authentication_providers"."position" ASC, "authentication_providers"."id" ASC LIMIT 1 [production:1 primary] Can't verify CSRF token authenticity.

Steps to reproduce:

  1. Run "RAILS_ENV=production bundle exec rake db:migrate"
  2. Run "RAILS_ENV=production bundle exec rake canvas:compile_assets"
  3. Configure apache2 and Run "sudo service apache2 start"
  4. Access to "http://localhost:3000"
  5. Login

Expected behavior:

Login Successfully and Dashboard be shown.

Actual behavior:

Invalid Authentication Error.

Additional notes:

image

nosadcoder commented 1 month ago

On the image, you can see some keywords,tokenWasEmpty, Can't verify CSRF token authenticity So, I think the cookie is invalid.

GlenSoftware commented 3 days ago

have you found a fix to this yet?