Answer the question
In order to leave comments, you need to log in
How to correctly implement authorization and a modal authorization window?
Aloha friends, I need help / advice in general for authorization and registration, I implemented the form, it works all the rules, but the problem with authorization through Facebook gives an error: (and you can not say that the site is local, checked on the server and also the addresses are all correctly drawn ), I also can’t customize the standard social media authorization component “socserv.auth.form”, I can’t understand where and how the residual transition link is taken already from the expanded form for authorization on the service to bind it to a specific transition image.
Also, a question arose in the pop-up authorization form, the form I connected it, everything seems to be normal, but in the form of social links are not displayed completely and are not active, also when in authorization, authorization goes through the form is redirected to the login page where it is displayed that the login has not occurred, but if they go back, then the entrance has occurred, how to make the entrance occur and just the modal window closes and everything is without transitions, by the way, I connected adjax in the component. To connect, I created a separate popup page, here is the connection and call code:
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
$APPLICATION->SetTitle("Вход");
?><sc ript type="text/javascript" src="//opt-560835.ssl.1c-bitrix-cdn.ru/bitrix/js/main/ajax.js?142935959535509"></sc ript>
<?$APPLICATION->IncludeComponent(
"bitrix:system.auth.authorize",
"",
array(
"REGISTER_URL" => "/login/registration.php",
"FORGOT_PASSWORD_URL" => "/login/foget.php",
"PROFILE_URL" => "/personal/",
"SHOW_ERRORS" => "Y",
"AJAX_MODE" => "Y",
"AJAX_OPTION_SHADOW" => "N",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N"
),
false
);?>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_after.php");?>
вызываю форму всплывающую форму
<!-- Всплывающее окно входа и регистрации -->
<sc ript type="text/javascript">
$(function() {
$('a.popup').fancybox({
'overlayShow': false,
'padding': 0, 'margin' : 0, 'width:': 750, 'height':750, 'maxWidth':650,
'scrolling' : 'no',
'titleShow': false,
'type': 'ajax',
'href': '/login/popup.php'
});
});
</sc ript>
<!-- Всплывающее окно входа и регистрации -->
<? if( !$USER->IsAuthorized() ): ?>
<p class="addcomment-form__right" >Вам необходимо <a class="popup" href="" on click="">авторизоваться</a></p>
<? else: ?>
Answer the question
In order to leave comments, you need to log in
By Facebook's error, see the description of the error at the link it gives. I suspect that you need to create an application for the site on Facebook, and in the bitrix "settings-> modules-> module settings-> social networks" (approximate path) you need to write something like api keys from the application in order for Facebook to authorize users.
Links to social networks are quite possibly generated on JS, which is a lot in the standard Bitrix templates, especially in the latest versions.
Is there a problem with a redirect after authorization in the standard template? If not, see which parameter you forgot to transfer to yours, most likely there is a link to the page where you need to redirect.
The form may lack checking the response of the script after authorization and subsequent processing, for example, reloading the page or updating some areas of the page.
The fact of the matter is that I set everything up fine on Facebook and registered snares and keys in the module settings and does not want to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question