MyBB Community Forums

Full Version: Issue with site log in
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Members of my forum finds it impossible to log in, it keeps showing: Authorization code mismatch. Are you accessing this function correctly? Please go back and try again. It's a new forum and I am using version 1.8.21
Check for missing input field in the login form:
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />

[ExiTuS]
I have done that already, here is my code




<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->login}</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
{$inline_errors}
{$member_loggedin_notice}
<form action="member.php" method="post">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
</tr>
<tr>
						   
					   
	 
	
<td class="trow1"><strong>{$lang->username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" size="25" style="width: 200px;" value="{$username}" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong><br /><span class="smalltext">{$lang->pw_note}</span></td>
<td class="trow2"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" value="{$password}" /> (<a href="member.php?action=lostpw">{$lang->lostpw_note}</a>)</td>
</tr>
<tr>
<td class="trow1" colspan="2" align="center"><label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label></td>
	 
	
						   
					   
</tr>
{$captcha}
</table>
<br />
<div align="center"><input type="submit" class="button" name="submit" value="{$lang->login}" /></div>
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$redirect_url}" />
<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
</form>
{$footer}
</body>
</html>



this has been a known issue , but every time i ask for this , people get angry by saying we have to add some steps manually ..
this has been there since 1.8.20 and if we still have to add this manually that means its a bug which has never been focused on ..
It's usually related to outdated templates, but in some cases server-related issues and network conditions may come into play.

Guest my_post_key tokens are created basing on sessions that persist with the help of a sid cookie; the sessions are additionally verified using the IP address, and new visits from same IP addresses, without associated sessions, cause previous sessions to expire - thus:
  • submitting forms as a guest with significant delay,
  • network changes that result in the IP address being changed*,
  • different users visiting with the same IP address (which may be more common in local communities, when using cellular data, and when IP addresses are not resolved after traffic passes through a reverse proxy)*,
  • server misconfiguration or overly aggressive caching modules that cause cookies to be handled improperly, or
  • outdated theme templates
may cause these errors to appear, and it looks like some of those (*) should indeed be resolved.

Changing values of the sid cookie between page visits would indicate problems other than template incompatibility: https://developers.google.com/web/tools/...ge/cookies
I still don't have solution, any help??
Hey,
Which version of Focus are you using ?
If it is the free version, i will update it this week since it has not been updated since long time (Sorry for that)
Temporary Solution -
I do believe it is outdated template, so revert the member_register to default MyBB and make sure your headerinclude is upto date and this will fix it.