protected function createMember(AccessToken $token, AbstractProvider $provider)
    {
        $session = $this->getSession();
        $providerName = $session->get('oauth2.provider');
        $user = $provider->getResourceOwner($token);

        /** @var Member|MemberExtension $member */
        $member = Member::create();
        $member = $this->getMapper($providerName)->map($member, $user);
        $member->OAuthSource = $providerName;
        $member->write();

        return $member;
    }