Magento 2 : Social Login via Rest ApiGet Token Authentication For Customer Logged With Facebook & Twitter : Magento 2Use SOAP and REST API TogetherGet All customers from Magento using rest APIREST api call for Guest userRest API strategy for mobile app in Magento 2How to use Magento 2 API?Rest API: Get order id by customer emailSign Up with Customer Image attribute REST API : Magento 2REST API Access Token IssuesMagento2 Push notification for IOS and AndroidMagento 2 Customer Rest Api Token error for some users [weird problem]
How did Elite on the NES work?
Why aren't road bicycle wheels tiny?
Simulate round-robin tournament draw
Why did Europeans not widely domesticate foxes?
Does using the Inspiration rules for character defects encourage My Guy Syndrome?
Like totally amazing interchangeable sister outfit accessory swapping or whatever
SQL Server placement of master database files vs resource database files
Preserving file and folder permissions with rsync
Determinant of a matrix with 2 equal rows
Is a self contained air-bullet cartridge feasible?
What is /etc/mtab in Linux?
Bright yellow or light yellow?
Arriving in Atlanta (after US Preclearance in Dublin). Will I go through TSA security in Atlanta to transfer to a connecting flight?
What is the ongoing value of the Kanban board to the developers as opposed to management
Has a Nobel Peace laureate ever been accused of war crimes?
Can gravitational waves pass through a black hole?
Are these square matrices always diagonalisable?
Is there a way to fake a method response using Mock or Stubs?
Protagonist's race is hidden - should I reveal it?
Is there a verb for listening stealthily?
What was Apollo 13's "Little Jolt" after MECO?
In search of the origins of term censor, I hit a dead end stuck with the greek term, to censor, λογοκρίνω
What do you call an IPA symbol that lacks a name (e.g. ɲ)?
/bin/ls sorts differently than just ls
Magento 2 : Social Login via Rest Api
Get Token Authentication For Customer Logged With Facebook & Twitter : Magento 2Use SOAP and REST API TogetherGet All customers from Magento using rest APIREST api call for Guest userRest API strategy for mobile app in Magento 2How to use Magento 2 API?Rest API: Get order id by customer emailSign Up with Customer Image attribute REST API : Magento 2REST API Access Token IssuesMagento2 Push notification for IOS and AndroidMagento 2 Customer Rest Api Token error for some users [weird problem]
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I need to create a user account using social network via the API.
I have created via native iOS application
that hooks into magento 2 store API. However, I can not find a way to create an account using any of social extensions.
They add buttons however they do not expose any functionality over rest API for creating accounts or login.
magento2 api customer-account webapi
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
I need to create a user account using social network via the API.
I have created via native iOS application
that hooks into magento 2 store API. However, I can not find a way to create an account using any of social extensions.
They add buttons however they do not expose any functionality over rest API for creating accounts or login.
magento2 api customer-account webapi
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Did you reached for the solution?
– Jsparo30
Apr 26 '17 at 14:56
Still looking - Mostly likely will need to code the full implementation
– Aaron Bedward
Apr 27 '17 at 16:53
Do you have an Idean, how to get the token after login with social ? review thishttps://magento.stackexchange.com/questions/175480/get-token-authentication-for-customer-logged-with-facebook-twitter-magento-2
– Jsparo30
May 24 '17 at 8:43
You can follow this guide: cloudways.com/blog/add-social-login-in-magento-2 to add Social login to your site.
– Say Truth
Jul 7 '17 at 2:04
|
I need to create a user account using social network via the API.
I have created via native iOS application
that hooks into magento 2 store API. However, I can not find a way to create an account using any of social extensions.
They add buttons however they do not expose any functionality over rest API for creating accounts or login.
magento2 api customer-account webapi
I need to create a user account using social network via the API.
I have created via native iOS application
that hooks into magento 2 store API. However, I can not find a way to create an account using any of social extensions.
They add buttons however they do not expose any functionality over rest API for creating accounts or login.
magento2 api customer-account webapi
magento2 api customer-account webapi
edited Jan 31 '18 at 12:49
Teja Bhagavan Kollepara
2,99241950
2,99241950
asked Feb 10 '17 at 0:00
Aaron BedwardAaron Bedward
63
63
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
Did you reached for the solution?
– Jsparo30
Apr 26 '17 at 14:56
Still looking - Mostly likely will need to code the full implementation
– Aaron Bedward
Apr 27 '17 at 16:53
Do you have an Idean, how to get the token after login with social ? review thishttps://magento.stackexchange.com/questions/175480/get-token-authentication-for-customer-logged-with-facebook-twitter-magento-2
– Jsparo30
May 24 '17 at 8:43
You can follow this guide: cloudways.com/blog/add-social-login-in-magento-2 to add Social login to your site.
– Say Truth
Jul 7 '17 at 2:04
|
Did you reached for the solution?
– Jsparo30
Apr 26 '17 at 14:56
Still looking - Mostly likely will need to code the full implementation
– Aaron Bedward
Apr 27 '17 at 16:53
Do you have an Idean, how to get the token after login with social ? review thishttps://magento.stackexchange.com/questions/175480/get-token-authentication-for-customer-logged-with-facebook-twitter-magento-2
– Jsparo30
May 24 '17 at 8:43
You can follow this guide: cloudways.com/blog/add-social-login-in-magento-2 to add Social login to your site.
– Say Truth
Jul 7 '17 at 2:04
Did you reached for the solution?
– Jsparo30
Apr 26 '17 at 14:56
Did you reached for the solution?
– Jsparo30
Apr 26 '17 at 14:56
Still looking - Mostly likely will need to code the full implementation
– Aaron Bedward
Apr 27 '17 at 16:53
Still looking - Mostly likely will need to code the full implementation
– Aaron Bedward
Apr 27 '17 at 16:53
Do you have an Idean, how to get the token after login with social ? review this
https://magento.stackexchange.com/questions/175480/get-token-authentication-for-customer-logged-with-facebook-twitter-magento-2
– Jsparo30
May 24 '17 at 8:43
Do you have an Idean, how to get the token after login with social ? review this
https://magento.stackexchange.com/questions/175480/get-token-authentication-for-customer-logged-with-facebook-twitter-magento-2
– Jsparo30
May 24 '17 at 8:43
You can follow this guide: cloudways.com/blog/add-social-login-in-magento-2 to add Social login to your site.
– Say Truth
Jul 7 '17 at 2:04
You can follow this guide: cloudways.com/blog/add-social-login-in-magento-2 to add Social login to your site.
– Say Truth
Jul 7 '17 at 2:04
|
1 Answer
1
active
oldest
votes
At first create a custom rest api with below route. you can follow this link:
https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ to create custom res api.
<!-- ws: social login -->
<route url="/V1/customrestapi/login" method="POST">
<service class="PackageNameCustomRestApiApiSocialloginInterface" method="socialLogin"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
Then in the socialLogin method pass the social data as array.Here you can put your logic as shown below code.
/**
* Copyright 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace PackageNameCustomRestApiModel;
use PackageNameCustomRestApiApiSocialloginInterface;
/**
* Defines the implementaiton class of the calculator service contract.
*/
class Sociallogin implements SocialloginInterface
{
protected $_storeManager;
protected $_scopeConfig;
protected $_objectManager;
protected $_customerFactory;
public function __construct(
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoCustomerModelCustomerFactory $customerFactory
)
$this->_storeManager = $storeManager;
$this->_scopeConfig = $scopeConfig;
$this->_objectManager = $objectManager;
$this->_customerFactory = $customerFactory;
/**
* Check Login.
*
* @api
* @param string[] $data The array of strings to socialLogin.
* @return $this
*/
public function socialLogin($data)
// json array for data should be "data":"email":"test@gmail.com","password":"password","type":"fb/gp","socialId":"","socialToken":"","firstName":"","lastName":"","dob":"","gender":""
// type is used to identify social media facebook or google+
if($data['type']=='fb')
// facbook login logic goes here
elseif($data['type']=='gp')
// google plus login logic goes here
|
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
At first create a custom rest api with below route. you can follow this link:
https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ to create custom res api.
<!-- ws: social login -->
<route url="/V1/customrestapi/login" method="POST">
<service class="PackageNameCustomRestApiApiSocialloginInterface" method="socialLogin"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
Then in the socialLogin method pass the social data as array.Here you can put your logic as shown below code.
/**
* Copyright 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace PackageNameCustomRestApiModel;
use PackageNameCustomRestApiApiSocialloginInterface;
/**
* Defines the implementaiton class of the calculator service contract.
*/
class Sociallogin implements SocialloginInterface
{
protected $_storeManager;
protected $_scopeConfig;
protected $_objectManager;
protected $_customerFactory;
public function __construct(
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoCustomerModelCustomerFactory $customerFactory
)
$this->_storeManager = $storeManager;
$this->_scopeConfig = $scopeConfig;
$this->_objectManager = $objectManager;
$this->_customerFactory = $customerFactory;
/**
* Check Login.
*
* @api
* @param string[] $data The array of strings to socialLogin.
* @return $this
*/
public function socialLogin($data)
// json array for data should be "data":"email":"test@gmail.com","password":"password","type":"fb/gp","socialId":"","socialToken":"","firstName":"","lastName":"","dob":"","gender":""
// type is used to identify social media facebook or google+
if($data['type']=='fb')
// facbook login logic goes here
elseif($data['type']=='gp')
// google plus login logic goes here
|
At first create a custom rest api with below route. you can follow this link:
https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ to create custom res api.
<!-- ws: social login -->
<route url="/V1/customrestapi/login" method="POST">
<service class="PackageNameCustomRestApiApiSocialloginInterface" method="socialLogin"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
Then in the socialLogin method pass the social data as array.Here you can put your logic as shown below code.
/**
* Copyright 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace PackageNameCustomRestApiModel;
use PackageNameCustomRestApiApiSocialloginInterface;
/**
* Defines the implementaiton class of the calculator service contract.
*/
class Sociallogin implements SocialloginInterface
{
protected $_storeManager;
protected $_scopeConfig;
protected $_objectManager;
protected $_customerFactory;
public function __construct(
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoCustomerModelCustomerFactory $customerFactory
)
$this->_storeManager = $storeManager;
$this->_scopeConfig = $scopeConfig;
$this->_objectManager = $objectManager;
$this->_customerFactory = $customerFactory;
/**
* Check Login.
*
* @api
* @param string[] $data The array of strings to socialLogin.
* @return $this
*/
public function socialLogin($data)
// json array for data should be "data":"email":"test@gmail.com","password":"password","type":"fb/gp","socialId":"","socialToken":"","firstName":"","lastName":"","dob":"","gender":""
// type is used to identify social media facebook or google+
if($data['type']=='fb')
// facbook login logic goes here
elseif($data['type']=='gp')
// google plus login logic goes here
|
At first create a custom rest api with below route. you can follow this link:
https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ to create custom res api.
<!-- ws: social login -->
<route url="/V1/customrestapi/login" method="POST">
<service class="PackageNameCustomRestApiApiSocialloginInterface" method="socialLogin"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
Then in the socialLogin method pass the social data as array.Here you can put your logic as shown below code.
/**
* Copyright 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace PackageNameCustomRestApiModel;
use PackageNameCustomRestApiApiSocialloginInterface;
/**
* Defines the implementaiton class of the calculator service contract.
*/
class Sociallogin implements SocialloginInterface
{
protected $_storeManager;
protected $_scopeConfig;
protected $_objectManager;
protected $_customerFactory;
public function __construct(
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoCustomerModelCustomerFactory $customerFactory
)
$this->_storeManager = $storeManager;
$this->_scopeConfig = $scopeConfig;
$this->_objectManager = $objectManager;
$this->_customerFactory = $customerFactory;
/**
* Check Login.
*
* @api
* @param string[] $data The array of strings to socialLogin.
* @return $this
*/
public function socialLogin($data)
// json array for data should be "data":"email":"test@gmail.com","password":"password","type":"fb/gp","socialId":"","socialToken":"","firstName":"","lastName":"","dob":"","gender":""
// type is used to identify social media facebook or google+
if($data['type']=='fb')
// facbook login logic goes here
elseif($data['type']=='gp')
// google plus login logic goes here
At first create a custom rest api with below route. you can follow this link:
https://alankent.me/2015/07/24/creating-a-new-rest-web-service-in-magento-2/ to create custom res api.
<!-- ws: social login -->
<route url="/V1/customrestapi/login" method="POST">
<service class="PackageNameCustomRestApiApiSocialloginInterface" method="socialLogin"/>
<resources>
<resource ref="anonymous"/>
</resources>
</route>
Then in the socialLogin method pass the social data as array.Here you can put your logic as shown below code.
/**
* Copyright 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace PackageNameCustomRestApiModel;
use PackageNameCustomRestApiApiSocialloginInterface;
/**
* Defines the implementaiton class of the calculator service contract.
*/
class Sociallogin implements SocialloginInterface
{
protected $_storeManager;
protected $_scopeConfig;
protected $_objectManager;
protected $_customerFactory;
public function __construct(
MagentoStoreModelStoreManagerInterface $storeManager,
MagentoFrameworkAppConfigScopeConfigInterface $scopeConfig,
MagentoFrameworkObjectManagerInterface $objectManager,
MagentoCustomerModelCustomerFactory $customerFactory
)
$this->_storeManager = $storeManager;
$this->_scopeConfig = $scopeConfig;
$this->_objectManager = $objectManager;
$this->_customerFactory = $customerFactory;
/**
* Check Login.
*
* @api
* @param string[] $data The array of strings to socialLogin.
* @return $this
*/
public function socialLogin($data)
// json array for data should be "data":"email":"test@gmail.com","password":"password","type":"fb/gp","socialId":"","socialToken":"","firstName":"","lastName":"","dob":"","gender":""
// type is used to identify social media facebook or google+
if($data['type']=='fb')
// facbook login logic goes here
elseif($data['type']=='gp')
// google plus login logic goes here
edited Feb 10 '17 at 9:57
answered Feb 10 '17 at 7:51
Prasanta HatuiPrasanta Hatui
1,4601514
1,4601514
|
|
Did you reached for the solution?
– Jsparo30
Apr 26 '17 at 14:56
Still looking - Mostly likely will need to code the full implementation
– Aaron Bedward
Apr 27 '17 at 16:53
Do you have an Idean, how to get the token after login with social ? review this
https://magento.stackexchange.com/questions/175480/get-token-authentication-for-customer-logged-with-facebook-twitter-magento-2
– Jsparo30
May 24 '17 at 8:43
You can follow this guide: cloudways.com/blog/add-social-login-in-magento-2 to add Social login to your site.
– Say Truth
Jul 7 '17 at 2:04