HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Problem with the login function on my forums
![ForumMaster](https://us.v-cdn.net/5018160/uploads/userpics/970/n2TVNCK5RFH1V.jpg)
in Feedback
Hey everyone, just wondering if anyone else is experiencing this problem.
When a user logins in or I do, I enter the username and password and click 'sign in' I get error "please try again", then I click sign in again without changing the username or password and it logs in fine.
What would be causing this strange thing?
0
Comments
Welcome to the community!
It could be you having a www and non-www version of your domain that is serving the same site (meaning //www.example.com and //example.com). Cookies are domain specific by default (including the subdomain). If this is the case, I would suggest fixing your server configuration to only serve the site on one of the domains.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Im on shared hosing so don't have access to the server. I've never had any problems with any other scripts on there. I have typed www. before the domain and still experience the problem.
Do you suggest I contact my web host?
Is the first page you log into example.com/forums/entry/signin and the second www.example.com/forums/entry/signin? Or vice versa?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
I've tried both, and they both have the same issue of you having to push the sign in button twice. Once you are logged in it works fine. Its all very strange![:) :)](https://open.vanillaforums.com/plugins/emojiextender/emoji/little/smile.png)
Do you have any advice on how to fix this, to make it work with www. and without www.?
All my members including the admin, have to click sign in twice to actually login.
When putting in the correct username and password and you click 'sign in' the user is presented with error message "Please try again." When you click 'sign in' again, the user is logged in correctly!
It is very strange, and basically I am getting 10's of emails every day from users who say they cannot login, they can but they have to click the button twice, but most people dont think to do that, they just think they have entered the wrong password.
Has any one got any advice on how to fix this?
Thanks
Try changing the cookie domain.
https://vanillaforums.org/discussion/19461/documentation-solved-strange-sign-in-problem-cookie-domain-for-non-www
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.