user-management icon indicating copy to clipboard operation
user-management copied to clipboard

Login not working

Open giacomomasseron opened this issue 9 years ago • 18 comments

I have a problem with login. I installed this component, and everything worked fine.

The problem is that when I login, I actually pass credentials check, but still I am not logged in Yii.

Anybody knows what can I do?

Thanks.

giacomomasseron avatar Feb 29 '16 19:02 giacomomasseron

Hi, need more data =) Did it redirect you or you stays on the same page ?

webvimark avatar Feb 29 '16 20:02 webvimark

I tried both. I tried to redirect after login or to return to homepage (I have a clean Yii installation).

The yii::app->user->IsGuest line always returns true.

giacomomasseron avatar Feb 29 '16 20:02 giacomomasseron

No, I mean after you enter credential and click "Login" button - application redirects you to another page or stays there ?

webvimark avatar Feb 29 '16 20:02 webvimark

it redirects in the homepage, but I am not logged.

giacomomasseron avatar Feb 29 '16 21:02 giacomomasseron

Lets debug :)

Could you set breakpoints (like die('1'), die('2'), etc) in AuthController on the following lines

  • 44 ( die('1'); before return $this->goHome(); )
  • 57 ( die('2'); before return $this->goBack(); )

webvimark avatar Mar 01 '16 07:03 webvimark

it dies at second die (line 57).

giacomomasseron avatar Mar 02 '16 16:03 giacomomasseron

Anyone can help me?

giacomomasseron avatar Mar 04 '16 13:03 giacomomasseron

Hmm, it's really strange. Like really strange. Could you upload your app in some repository. Just remove all data except core and this moduel and I'll try find what is the problem

webvimark avatar Mar 04 '16 19:03 webvimark

Have the same problem, any solution?

marcelodeandrade avatar Mar 24 '16 12:03 marcelodeandrade

@GiacomoK Check in backend config and remove the 'user' component default. Solved my problem.

marcelodeandrade avatar Mar 24 '16 12:03 marcelodeandrade

@GiacomoK , if you installed Yii2-advance-app, follow @marcelodeandrade 's recommendation. Seems like the configuration instructions for this module is based on Yii2-basic-app.

HanafiAhmat avatar Apr 18 '16 03:04 HanafiAhmat

@HanafiAhmat , I've followed above steps given but it not works for yii2 advanced app. After login redirects to login page only. May I know how to solve it.

msankar1991 avatar Aug 25 '16 11:08 msankar1991

@msankar1991 You follow my tip? Check all configs [common,frontend,backend]

marcelodeandrade avatar Aug 25 '16 12:08 marcelodeandrade

@HanafiAhmat , Yes. I've followed the tip for remove user component default only but it not works.

msankar1991 avatar Aug 26 '16 06:08 msankar1991

@msankar1991 , if your advance app is a clean install, @marcelodeandrade tip should work. Else, there might be some misconfigurations in either your common config or backend config. can you show us your configuration files?

HanafiAhmat avatar Aug 27 '16 11:08 HanafiAhmat

Have similar problem. When I log in from backend I am not logged in frontend

Sabirgojayev avatar Mar 15 '17 08:03 Sabirgojayev

@sabirgojayev, does your frontend app share the same cookie session with backend app? Default yii2-advanced-app configurations separates them.

HanafiAhmat avatar Mar 15 '17 09:03 HanafiAhmat

I solved the problem was as @HanafiAhmat said in cookie session parameter in config

Sabirgojayev avatar Mar 15 '17 13:03 Sabirgojayev