質問 > その他 > LINEでソーシャルログイン時、"Notice: Undefined index: email_verified "が発生する |
その他
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | 下へ |
投稿者 | スレッド |
---|---|
youme771 |
投稿日時: 2022/7/4 15:13
対応状況: −−−
|
新米 登録日: 2022/7/4 居住地: 投稿: 1 |
LINEでソーシャルログイン時、"Notice: Undefined index: email_verified "が発生する お世話になります。「ソーシャルログインプラグイン」について質問させてください
[導入プラグイン] ソーシャルログインプラグイン for EC-CUBE4 [カスタマイズの有無] 無し [現象] LINEでログインを行う際、以下のようなエラー(ContextErrorException)が発生します。 要因が何であるか、対処法をご教示いただけないでしょうか? メール認証絡みかな?と思ってはいるのですが、 どう対処してあげればよいのかわかりませんでした。 Auth0の設定で何か必要なのであれば、ご教示いただければと思います。 エラーメッセージ:Notice: Undefined index: email_verified ContextErrorException /app/Plugin/SocialLogin4/Security/Authenticator/Auth0Authenticator.php (line 96) 以下抜粋 ================ /** * @inheritDoc */ public function getUser($credentials, UserProviderInterface $userProvider) { // TODO: Implement getUser() method. $user = $this->getAuth0Client() ->fetchUserFromToken($credentials); if (!$user->toArray()['email_verified']) { throw new AuthenticationException(); } /** @var Connection $Connection */ $Connection = $this->entityManager->getRepository(Connection::class) ->findOneBy(['user_id' => $user->toArray()["sub"]]); // 連携済みの場合 if ($Connection) { $Customer = $this->entityManager->getRepository(Customer::class) ->findOneBy(['id' => $Connection->getCustomerId()]); return $Customer; } /** @var Customer $Customer */ $Customer = $this->entityManager->getRepository(Customer::class) ->findOneBy(['email' => $user->getEmail()]); // 会員登録していない場合、会員登録ページへ if (null === $Customer) { throw new FinishRegistrationException($user->toArray()); } // 会員登録済みの場合はユーザー識別子を保存 $Connection = new Connection(); $Connection->setUserId($user->toArray()["sub"]); $Connection->setCustomerId($Customer->getId()); $this->entityManager->persist($Connection); $this->entityManager->flush(); return $Customer; } |
yuh |
投稿日時: 2022/12/15 13:10
対応状況: −−−
|
神 登録日: 2013/1/9 居住地: 大阪 投稿: 1818 |
Re: LINEでソーシャルログイン時、"Notice: Undefined index: email_verified "が発生する LINEのAPIで返信された情報でemail_verified属性が存在していないようです、
プラグインファイルの修正が必要かもしれないので プラグインの作成会社にお問い合わせするほうがいいと思います。
|
スレッド表示 | 新しいものから | 前のトピック | 次のトピック | トップ |