通販サイトを作成中で管理者と顧客のログインページを分けているのですが、管理者のページをログアウトしたところ、再びログインする事ができなくなりました。ターミナルは以下のように表示されました。どうすれば再びログインできますか?
Started POST "/admin/sign_in" for 49.105.68.33 at 2023-01-02 05:53:17 +0000
Cannot render console from 49.105.68.33! Allowed networks: 127.0.0.0/127.255.255.255, ::1
Processing by Admin::SessionsController#create as HTML
Parameters: {"authenticity_token"=>"[FILTERED]", "admin"=>{"email"=>"cleamwafers@yahoo.co.jp", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"ログイン"}
Admin Load (0.1ms) SELECT "admins".* FROM "admins" WHERE "admins"."email" = ? ORDER BY "admins"."id" ASC LIMIT ? [["email", "cleamwafers@yahoo.co.jp"], ["LIMIT", 1]]
Completed 401 Unauthorized in 4ms (ActiveRecord: 0.1ms | Allocations: 1701)
Processing by Admin::SessionsController#new as HTML
Parameters: {"authenticity_token"=>"[FILTERED]", "admin"=>{"email"=>"cleamwafers@yahoo.co.jp", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"ログイン"}
Rendering layout layouts/application.html.erb
Rendering admin/sessions/new.html.erb within layouts/application
Rendered /home/ec2-user/.rvm/gems/ruby-3.1.2/gems/devise-4.8.1/app/views/devise/shared/_error_messages.html.erb (Duration: 0.1ms | Allocations: 46)
Rendered admin/shared/_links.html.erb (Duration: 0.1ms | Allocations: 41)
Rendered admin/sessions/new.html.erb within layouts/application (Duration: 4.3ms | Allocations: 1311)
[Webpacker] Everything's up-to-date. Nothing to do
Rendered layout layouts/application.html.erb (Duration: 11.3ms | Allocations: 5221)
Completed 200 OK in 318ms (Views: 12.9ms | ActiveRecord: 0.0ms | Allocations: 5820)
<h2>管理者ログイン</h2> <%= form_with model: @admin, url: new_admin_session_path do |f| %> <%= render "devise/shared/error_messages", resource: resource %> <div class="field"> <%= f.label :メールアドレス %><br /> <%= f.email_field :email, autofocus: true, autocomplete: "email" %> </div> <div class="field"> <%= f.label :パスワード %><br /> <%= f.password_field :password, autocomplete: "current-password" %> </div> <% if devise_mapping.rememberable? %> <div class="field"> <%= f.check_box :remember_me %> <%= f.label :remember_me %> </div> <% end %> <div class="actions"> <%= f.submit "ログイン" %> </div> <% end %> <%= render "admin/shared/links" %>
0 コメント