MyBB Community Forums

Full Version: Authorization code mismatch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I did follow this guide:  https://community.mybb.com/thread-218460...pid1308277

But still no working

member_login
<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>

portal_welcome_guesttext (We dont use portal though)
<span class="smalltext">{$lang->guest_welcome_registration}</span><br />
<br />
<form method="post" action="{$mybb->settings['bburl']}/member.php"><input type="hidden" name="action" value="do_login" /><input type="hidden" name="url" value="{$portal_url}" />
{$username}<br />&nbsp;&nbsp;<input type="text" class="textbox" name="username" value="" /><br /><br />
{$lang->password}<br />&nbsp;&nbsp;<input type="password" class="textbox" name="password" value="" /><br /><br />
<label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" value="yes" /> {$lang->remember_me}</label><br /><br />
<br /><input type="submit" class="button" name="loginsubmit" value="{$lang->login}" /><input name="my_post_key" type="hidden" value="{$mybb->post_code}" /></form>

error_nopermission
{$lang->error_nopermission_guest_1}
<ol>
<li>{$lang->error_nopermission_guest_2}</li>
<li>{$lang->error_nopermission_guest_3}</li>
<li>{$lang->error_nopermission_guest_4}</li>
<li>{$lang->error_nopermission_guest_5}</li>
</ol>
<form action="member.php" method="post">
<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}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><span class="smalltext"><strong>{$lang->login}</strong></span></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang_username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" tabindex="1" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong></td>
<td class="trow2"><input type="password" class="textbox" name="password" tabindex="2" /></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>
<tr>
<td class="trow2" colspan="2"><span class="smalltext float_right" style="padding-top: 3px;"><a href="member.php?action=register">{$lang->need_reg}</a> | <a href="member.php?action=lostpw">{$lang->forgot_password}</a>&nbsp;</span>&nbsp;<input type="submit" class="button" value="{$lang->login}" tabindex="3" /></td>
</tr>
</table>
</form>
<br />

header_welcomeblock_guest
<span class="d-flex ml-auto">
<li class="bold text-uppercase">
<a href="member.php?action=register" title="Register today!"><i class="fa fa-user-plus"></i>&nbsp; Register</a>
</li>
<li class="bold text-uppercase">
<a href="member.php?action=login" title="Login"><i class="fa fa-sign-in-alt"></i>&nbsp; Login</a>
</li>
</span>


Thank u for help

It only happen to some members. Not everyone (For me example I am able to login. But one member said they cant). I also have mybb 2fa plugin as well, and he is use mybb 2fa (i also use and can login)
You haven't applied the code into the header_welcomeblock_guest template. This will definitely be causing your issue.
(2019-06-17, 07:08 PM)Ben Wrote: [ -> ]You haven't applied the code into the header_welcomeblock_guest template. This will definitely be causing your issue.

Where do I put it if there’s no form tags?
Its the inner content of the form, the opening and closing form tags are somewhere else.
Try adding the code at the very end after the close span tag and it should be fine.
(2019-06-18, 03:36 AM)effone Wrote: [ -> ]Its the inner content of the form, the opening and closing form tags are somewhere else.
Try adding the code at the very end after the close span tag and it should be fine.
After some time, error has popped up. I believe it has to do with mybb 2fa settings plugin https://community.mybb.com/mods.php?action=view&pid=941

m
ybb2fa_form 
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->mybb2fa}</title>
{$headerinclude}
</head>
<body>
{$header}
<table width="100%" border="0" align="center">
<tr>
	<td valign="top">
		<form action="misc.php" method="post">
		<input type="hidden" name="action" value="mybb2fa" />
		<input type="hidden" name="uid" value="{$loginhandler->login_data['uid']}" />
		<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
			<tr>
				<td class="thead"><strong>{$lang->mybb2fa}</strong></td>
			</tr>
			<tr>
				<td class="trow1">{$lang->mybb2fa_code}: <input type="text" class="textbox" name="code" /></td>
			</tr>
			<tr>
				<td class="trow2"><input type="submit" class="button" value="{$lang->mybb2fa_check}" /></td>
			</tr>
		</table>
		</form>
	</td>
</tr>
</table>

</body>
</html>
Error still happening. On hard refresh it works / purged cache
Still occuring!
What is your website URL?
(2019-06-25, 04:01 AM)effone Wrote: [ -> ]What is your website URL?

I will PM you it effone

I also edited the welcomeblock guest template to add form tags, but still no luck
Looks like you have a similar problem like this:
https://community.mybb.com/thread-222952...pid1329491

Which caching system you are using and what type of hosting?

You can, however, bypass the check temporarily (AT YOUR OWN RISK) so that things start working until you get a solution.
https://community.mybb.com/thread-223288.html
Pages: 1 2