NHN_KCP 본인인증 모바일에서 새창열기 방식으로 수정

This commit is contained in:
thisgun
2022-12-20 17:41:22 +09:00
parent 22bfc5e9bb
commit df176c6ad9
8 changed files with 20 additions and 8 deletions

View File

@ -19,7 +19,10 @@ function certify_win_open(type, url, event) {
if($("input[name=veri_up_hash]").length < 1) if($("input[name=veri_up_hash]").length < 1)
$("input[name=cert_no]").after('<input type="hidden" name="veri_up_hash" value="">'); $("input[name=cert_no]").after('<input type="hidden" name="veri_up_hash" value="">');
if( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) // iframe에서 세션공유 문제가 있어서 더 이상 iframe 을 사용하지 않습니다.
var use_iframe = false;
if(use_iframe && (navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1))
{ {
var $frm = $(event.target.form); var $frm = $(event.target.form);

View File

@ -12,6 +12,7 @@ if($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipin
<div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>"> <div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>">
<div class="new_win_con"> <div class="new_win_con">
<form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off"> <form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="cert_no" value="">
<h3>이메일로 찾기</h3> <h3>이메일로 찾기</h3>
<fieldset id="info_fs"> <fieldset id="info_fs">
<p> <p>

View File

@ -213,12 +213,15 @@ $ct_cert->mf_clear();
var is_mobile = false; var is_mobile = false;
$opener.name="parentPage"; $opener.name="parentPage";
// 안드로이드 웹뷰에서 거의 다 새창을 지원하므로 더 이상 iframe 을 사용하지 않습니다.
/*
if (typeof g5_is_mobile != "undefined" && g5_is_mobile ) { if (typeof g5_is_mobile != "undefined" && g5_is_mobile ) {
$opener = window.parent; $opener = window.parent;
is_mobile = true; is_mobile = true;
} else { } else {
$opener = window.opener; $opener = window.opener;
} }
*/
// up_hash 검증 // up_hash 검증
if( document.mbFindForm.up_hash.value != $opener.$("input[name=veri_up_hash]").val() ) { if( document.mbFindForm.up_hash.value != $opener.$("input[name=veri_up_hash]").val() ) {

View File

@ -116,17 +116,17 @@ window.onload = function() {
function cert_page() function cert_page()
{ {
var frm = document.form_auth; var frm = document.form_auth;
// iframe에서 세션공유 문제가 있어서 더 이상 iframe 을 사용하지 않습니다.
var use_iframe = false;
if ( ( frm.req_tx.value == "auth" || frm.req_tx.value == "otp_auth" ) ) if ( ( frm.req_tx.value == "auth" || frm.req_tx.value == "otp_auth" ) )
{ {
frm.action=".<?php echo $resultPage; ?>"; frm.action=".<?php echo $resultPage; ?>";
// MOBILE if(use_iframe && ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) )
if( ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) )
{ {
self.name="kcp_cert"; self.name="kcp_cert";
} }
// PC
else else
{ {
frm.target="kcp_cert"; frm.target="kcp_cert";
@ -139,12 +139,12 @@ function cert_page()
else if ( frm.req_tx.value == "cert" ) else if ( frm.req_tx.value == "cert" )
{ {
if( ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) ) // 스마트폰인 경우 if(use_iframe && ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) )
{ {
window.parent.$("input[name=veri_up_hash]").val(frm.up_hash.value); // up_hash 데이터 검증을 위한 필드 window.parent.$("input[name=veri_up_hash]").val(frm.up_hash.value); // up_hash 데이터 검증을 위한 필드
self.name="auth_popup"; self.name="auth_popup";
} }
else // 스마트폰 아닐때 else
{ {
window.opener.$("input[name=veri_up_hash]").val(frm.up_hash.value); // up_hash 데이터 검증을 위한 필드 window.opener.$("input[name=veri_up_hash]").val(frm.up_hash.value); // up_hash 데이터 검증을 위한 필드
frm.target = "auth_popup"; frm.target = "auth_popup";

View File

@ -211,8 +211,10 @@ $ct_cert->mf_clear();
$(function() { $(function() {
var $opener; var $opener;
var is_mobile = false; var is_mobile = false;
// iframe에서 세션공유 문제가 있어서 더 이상 iframe 을 사용하지 않습니다.
var use_iframe = false;
if( ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) ) { // 스마트폰인 경우 if(use_iframe && ( navigator.userAgent.indexOf("Android") > - 1 || navigator.userAgent.indexOf("iPhone") > - 1 ) ) {
$opener = window.parent; $opener = window.parent;
is_mobile = true; is_mobile = true;
} else { } else {

View File

@ -12,6 +12,7 @@ if($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipin
<div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>"> <div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>">
<div class="new_win_con"> <div class="new_win_con">
<form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off"> <form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="cert_no" value="">
<h3>이메일로 찾기</h3> <h3>이메일로 찾기</h3>
<fieldset id="info_fs"> <fieldset id="info_fs">
<p> <p>

View File

@ -12,6 +12,7 @@ if($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipin
<div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>"> <div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>">
<div class="new_win_con"> <div class="new_win_con">
<form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off"> <form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="cert_no" value="">
<h3>이메일로 찾기</h3> <h3>이메일로 찾기</h3>
<fieldset id="info_fs"> <fieldset id="info_fs">
<p> <p>

View File

@ -12,6 +12,7 @@ if($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipin
<div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>"> <div id="find_info" class="new_win<?php if($config['cf_cert_use'] != 0 && $config['cf_cert_find'] != 0) { ?> cert<?php } ?>">
<div class="new_win_con"> <div class="new_win_con">
<form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off"> <form name="fpasswordlost" action="<?php echo $action_url ?>" onsubmit="return fpasswordlost_submit(this);" method="post" autocomplete="off">
<input type="hidden" name="cert_no" value="">
<h3>이메일로 찾기</h3> <h3>이메일로 찾기</h3>
<fieldset id="info_fs"> <fieldset id="info_fs">
<p> <p>