Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect loop with existin devise model #699

Closed
di-hardt opened this issue Sep 30, 2017 · 3 comments
Closed

Redirect loop with existin devise model #699

di-hardt opened this issue Sep 30, 2017 · 3 comments

Comments

@di-hardt
Copy link

Hello everybody!

I try to use an existing devise model to login into Camaleon. I used this FAQ page to get it work. But everytime I enterd the (correct) login credentials the app redirects me to the root url instead the admin dashboard.

After a little search, i found this code on Github and added it to my app. This results in a redirect loop after I entered the credentials. The serverlog shows the redirect loop is between the two url's /admin & /administrators/sign_in:

Started GET "/admin" for 172.28.0.1 at 2017-09-30 14:38:24 +0000
Cannot render console from 172.28.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by CamaleonCms::AdminController#dashboard as HTML
CamaleonCms::Site Load (0.5ms)  SELECT  "ccmsterm_taxonomy".* FROM "ccmsterm_taxonomy" WHERE "ccmsterm_taxonomy"."taxonomy" = $1 ORDER BY "ccmsterm_taxonomy"."term_group" DESC LIMIT $2  [["taxonomy", "site"], ["LIMIT", 1]]
CamaleonCms::Meta Load (0.4ms)  SELECT  "ccmsmetas".* FROM "ccmsmetas" WHERE "ccmsmetas"."objectid" = $1 AND "ccmsmetas"."object_class" = $2 AND "ccmsmetas"."key" = $3 ORDER BY "ccmsmetas"."id" ASC LIMIT $4  [["objectid", 1], ["object_class", "Site"], ["key", "_default"], ["LIMIT", 1]]
Camaleon CMS - Hook "app_before_load" executed from dependency front_cache
Camaleon CMS - Hook "app_before_load" executed from dependency cama_contact_form
CAMA_ADMIN_LOGIN_PATH => /administrators/sign_in
Redirected to http://localhost:3000/administrators/sign_in
Filter chain halted as :cama_authenticate rendered or redirected
Completed 302 Found in 7ms (ActiveRecord: 0.9ms)

Started GET "/administrators/sign_in" for 172.28.0.1 at 2017-09-30 14:38:24 +0000
Cannot render console from 172.28.0.1! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
Processing by Devise::SessionsController#new as HTML
Administrator Load (0.5ms)  SELECT  "administrators".* FROM "administrators" WHERE "administrators"."id" = $1 ORDER BY "administrators"."id" ASC LIMIT $2  [["id", 1], ["LIMIT", 1]]
Redirected to http://localhost:3000/admin
Filter chain halted as :require_no_authentication rendered or redirected
Completed 302 Found in 3ms (ActiveRecord: 0.5ms)

After digging a bit deeper I figured out, that cama_current_user returns nil . So I suppose that Camaleon does not recognize the logged in administrator (?).

3 hours later I have no further ideas how to debug or track down this error. All I want is to enter the admin panel with my existing model.

Hopefully someone of you have some ideas and can help me!

@owen2345
Copy link
Owner

@Psych0D can you create a repo with the problem?

@di-hardt
Copy link
Author

di-hardt commented Oct 1, 2017

I try to provide it this week ok? I'm very busy right now.

Are you familiar with docker? Because devise using a LDAP-Server for authentication in my scenario, and providing a docker container is much more easier as writing a whole installation instruction ;)

@owen2345
Copy link
Owner

owen2345 commented Oct 2, 2017

ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants