POST api/account/auth
Latest api to login/register using using external providers like facebook, google, phone number auth
Request Information
URI Parameters
None.
Body Parameters
Credentials to be used for authenticating the user
AuthDataName | Description | Type | Additional information |
---|---|---|---|
token |
token recieved from external provider like google,facebook |
string |
Required |
provider |
id token received from provider - value like google, facebook, firebase_phone_auth token validator |
string |
None. |
app_source |
different flavour of app. source id |
integer |
None. |
Request Formats
application/json, text/json
{ "token": "sample string 1", "provider": "sample string 2", "app_source": 1 }
application/xml, text/xml
<auth_data xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models.v5"> <app_source>1</app_source> <provider>sample string 2</provider> <token>sample string 1</token> </auth_data>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
On success, returns valid ApplicationToken that can be used for future transactions. On failure, return 401 Unauthorized http result with the specified values.
ExternalAuthIdentityName | Description | Type | Additional information |
---|---|---|---|
token_identity |
user authentication token identity |
AuthTokenIdentity |
None. |
is_password_set |
when user signin using external provider then set password for user Lifetrons account |
boolean |
None. |
is_mobile_number_set |
when user signin using external provider then set mobile number for user Lifetrons account |
boolean |
None. |
is_new_user |
check user is newly created or already exists on Lifetrons |
boolean |
None. |
resp_code |
Lifetrons response code |
string |
None. |
resp_msg |
Lifetrons response message |
string |
None. |
Response Formats
application/json, text/json
{ "token_identity": { "user_identity": { "user_id": 1, "uid": "sample string 2" }, "token": "sample string 1", "firebase_token": "sample string 2" }, "is_password_set": true, "is_mobile_number_set": true, "is_new_user": true, "resp_code": "sample string 4", "resp_msg": "sample string 5" }
application/xml, text/xml
<external_auth_resp xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models.v5"> <resp_code xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 4</resp_code> <resp_msg xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 5</resp_msg> <is_mobile_number_set>true</is_mobile_number_set> <is_new_user>true</is_new_user> <is_password_set>true</is_password_set> <token_identity> <firebase_token>sample string 2</firebase_token> <token>sample string 1</token> <user_identity xmlns:d3p1="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Seedwork.v3"> <d3p1:uid>sample string 2</d3p1:uid> <d3p1:user_id>1</d3p1:user_id> </user_identity> </token_identity> </external_auth_resp>