Skip to main content

Social Login

FIYGE supports OAuth login of various social platforms only through the authorization code flow.

Get OAuth providers​

The following request will return the configured OAuth providers from the FIYGE backend,

Request​

POST /access_controls/users/login.json

Response​

{
"errors": [],
"message": [],
"oauth_providers": {
"google": {
"enabled": "1",
"client_id": "7073dda2-8df0-4cfa-9585-c0432c22cee0.apps.googleusercontent.com"
}
},
"is_multi_tenant": 1,
"allow_public_signup": 1,
"http_referer": false,
"organization": {
"id": "2",
"name": "VFI Group",
"app_description": "Simplify your finances with our intuitive accounting software—accurate books, confident decisions.",
"app_key_features_1": "Financial reporting.",
"app_key_features_2": "Simplified bookkeeping.",
"app_key_features_3": "Secure cloud-based access.",
"login_image": {
"_acl": " u-1",
"_acl_delete": " u-1",
"_acl_edit": " u-1",
"_acl_tmp": null,
"_acl_tmp_delete": null,
"_acl_tmp_edit": null,
"created": "2021-09-02 15:13:43",
"created_by": "-1",
"deleted": "0",
"description": null,
"field_type": "login_image",
"flags": null,
"id": "1595",
"imported": null,
"imported_by": null,
"is_demo_data": null,
"is_public": null,
"message_error": null,
"message_info": null,
"message_warn": null,
"mime_type": "image/png",
"modified": "2025-05-27 19:34:22",
"modified_by": "148",
"name": "tool.png",
"owned_by": null,
"path": "2025/03/07/14/67caffa0-b724-4d0f-9dd8-47b6ac69033c.png",
"primary_acl_group": null,
"related_to": "2",
"related_to_model": "organizations",
"related_to_model_class_name": "\\module\\crm_base\\model\\organizations",
"revision": "1",
"storage_path": "webroot/img/uploads/",
"url": null,
"_acl_comment": null,
"tags": null,
"validation_summary": null,
"validation_summary_datetime": null,
"__created_by": "Maax Core Development Team",
"created_by_user_name": "tushar@canstartco.com",
"__modified_by": "Tushar Takkar",
"modified_by_user_name": "tushar@fiyge.com",
"__owned_by": "",
"owned_by_user_name": null,
"created_by_model": "created_by_user",
"modified_by_model": "modified_by_user",
"__related_to": ""
},
"organization_image": {
"_acl": " u-1",
"_acl_delete": " u-1",
"_acl_edit": " u-1",
"_acl_tmp": null,
"_acl_tmp_delete": null,
"_acl_tmp_edit": null,
"created": "2021-09-02 15:13:43",
"created_by": "-1",
"deleted": "0",
"description": null,
"field_type": "organization_image",
"flags": null,
"id": "1596",
"imported": null,
"imported_by": null,
"is_demo_data": null,
"is_public": null,
"message_error": null,
"message_info": null,
"message_warn": null,
"mime_type": "image/png",
"modified": "2025-05-27 19:34:22",
"modified_by": "148",
"name": "tool.png",
"owned_by": null,
"path": "2025/03/07/14/67caffa0-8edc-40b1-b6a5-4e27ac69033c.png",
"primary_acl_group": null,
"related_to": "2",
"related_to_model": "organizations",
"related_to_model_class_name": "\\module\\crm_base\\model\\organizations",
"revision": "1",
"storage_path": "webroot/img/uploads/",
"url": null,
"_acl_comment": null,
"tags": null,
"validation_summary": null,
"validation_summary_datetime": null,
"__created_by": "Maax Core Development Team",
"created_by_user_name": "tushar@canstartco.com",
"__modified_by": "Tushar Takkar",
"modified_by_user_name": "tushar@fiyge.com",
"__owned_by": "",
"owned_by_user_name": null,
"created_by_model": "created_by_user",
"modified_by_model": "modified_by_user",
"__related_to": ""
},
"favicon_image": {
"_acl": null,
"_acl_delete": null,
"_acl_edit": null,
"_acl_tmp": null,
"_acl_tmp_delete": null,
"_acl_tmp_edit": null,
"created": "2013-09-23 10:54:53",
"created_by": "1",
"deleted": "0",
"description": null,
"field_type": "favicon_image",
"flags": null,
"id": "347",
"imported": null,
"imported_by": null,
"is_demo_data": null,
"is_public": null,
"message_error": null,
"message_info": null,
"message_warn": null,
"mime_type": "image/vnd.microsoft.icon",
"modified": "2025-05-27 19:34:22",
"modified_by": "148",
"name": "favicon.ico",
"owned_by": null,
"path": "2025/05/26/19/6834c577-db10-4fd0-9825-4f4bac69033c.vnd.microsoft.icon",
"primary_acl_group": null,
"related_to": "2",
"related_to_model": "organizations",
"related_to_model_class_name": "\\module\\crm_base\\model\\organizations",
"revision": "1",
"storage_path": "webroot/img/uploads/",
"url": null,
"_acl_comment": null,
"tags": null,
"validation_summary": null,
"validation_summary_datetime": null,
"__created_by": "System Admin",
"created_by_user_name": "admin@canstartco.com",
"__modified_by": "Tushar Takkar",
"modified_by_user_name": "tushar@fiyge.com",
"__owned_by": "",
"owned_by_user_name": null,
"created_by_model": "created_by_user",
"modified_by_model": "modified_by_user",
"__related_to": ""
},
"app_image": {
"_acl": null,
"_acl_delete": null,
"_acl_edit": null,
"_acl_tmp": null,
"_acl_tmp_delete": null,
"_acl_tmp_edit": null,
"created": "2025-05-27 19:34:22",
"created_by": "148",
"deleted": "0",
"description": null,
"field_type": "app_image",
"flags": null,
"id": "25485",
"imported": null,
"imported_by": null,
"is_demo_data": "0",
"is_public": "0",
"message_error": null,
"message_info": null,
"message_warn": null,
"mime_type": "image/png",
"modified": "2025-05-27 19:34:22",
"modified_by": null,
"name": "login-DrG2U86B.png",
"owned_by": null,
"path": "2025/05/27/19/683613be-f684-40a3-9c2a-4083ac69033c.png",
"primary_acl_group": null,
"related_to": "2",
"related_to_model": "organizations",
"related_to_model_class_name": "\\module\\crm_base\\model\\organizations",
"revision": "1",
"storage_path": "webroot/img/uploads/",
"url": null,
"_acl_comment": null,
"tags": null,
"validation_summary": null,
"validation_summary_datetime": null,
"__created_by": "Tushar Takkar",
"created_by_user_name": "tushar@fiyge.com",
"__modified_by": "",
"modified_by_user_name": null,
"__owned_by": "",
"owned_by_user_name": null,
"created_by_model": "created_by_user",
"__related_to": ""
}
},
"controllerClass": "\\module\\access_controls\\controller\\users",
"modelClass": "\\module\\access_controls\\model\\users",
"notEmptyField": [],
"organization_name": null,
"organization_id": null,
"user_id": null,
"user_fullname": null,
"data": []
}

Attributes​

oauth_providers has the following structure, where key is the name of the OAuth provider and the value contains client_id and enabled.

{
"NAME_OF_THE_OAUTH_PROVIDER": {
"client_id": "CLIENT_ID",
"enabled": "1" // 0: disabled, 1: enabled
}
}
  • client_id is the client id provided by the social platform
  • enabled determines whether the OAuth provider is enabled in FIYGE
danger

You should not allow users to redirect to OAuth providers which are not enabled. Disabled OAuth providers are often not properly configured, therefore users may face unexpected error.

Authenticate in FIYGE​

Here is the request to login through an OAuth provider

Request​

POST /access_controls/users/social_login.json

Payload​

{
"provider": "Google",
"callback": "aHR0cDovL2xvY2FsaG9zdDozMDAwL2F1dGg=",
"code": "NC8wQVVKUi14N1FYbk5nQi12clRabUp2QXZOd2ZwSzZJbFJKb0N2dVBxQlRhWFdGMGdQSkU3Y2FoWHA2eU9qYjRScEI1VHVwZw==",
"encoded": "1"
}
  • provider is name of the OAuth provider, e.g. Google, Facebook, LinkedIn, Microsoft, Twitter
  • callback is the base64 encoded redirect url
  • code is the base64 encoded authorization code returned from the OAuth provider
  • token is the same as code, some OAuth providers use the term "token" instead of code. Users only need to provide either code or token
  • encoded is always 1

Response​

{
"errors": [],
"message": [
"login successfully"
],
"oauth_providers": {
"google": {
"enabled": "1",
"client_id": "7073dda2-8df0-4cfa-9585-c0432c22cee0.apps.googleusercontent.com"
}
},
"is_multi_tenant": 1,
"allow_public_signup": 1,
"http_referer": false,
"refresh_token": "REFRESH_TOKEN",
"access_token": "ACCESS_TOKEN",
"inherit_views": 1,
"alias": "users",
"singular": "user",
"model": "users",
"controllerClass": "\\module\\access_controls\\controller\\users",
"modelClass": "\\module\\access_controls\\model\\users",
"notEmptyField": [],
"organization_name": null,
"organization_id": "26",
"user_id": "1248",
"user_fullname": "Username",
"data": {
"sub": "115643907510527134076",
"name": "Username",
"given_name": "GIVEN_NAME",
"family_name": "FAMILY_NAME",
"picture": "PROFILE_PICTURE_URL",
"email": "EMAIL_ADDRESS",
"email_verified": true,
"hd": "fiyge.com",
"users": {
"id": "USER_ID",
"_acl": " u148 u1248",
"_acl_delete": " u148",
"_acl_edit": " u148 u1248",
"_acl_tmp": null,
"_acl_tmp_delete": null,
"_acl_tmp_edit": null,
"created": "2025-02-19 21:49:13",
"created_by": "148",
"currency_id": "20",
"deleted": "0",
"department": null,
"description": null,
"ext": null,
"fax": null,
"first_name": "FIRST_NAME",
"flags": null,
"is_active": "1",
"is_demo_data": "0",
"is_license_agreement_accepted": "1",
"is_public": "0",
"last_name": "LAST_NAME",
"message_error": null,
"message_info": null,
"message_warn": null,
"modified": "2025-04-02 13:53:46",
"modified_by": "1248",
"name": "NAME",
"organization_id": "26",
"owned_by": "148",
"parent_id": null,
"region_id": null,
"revision": "10",
"salutation": null,
"signature": null,
"src": null,
"status": null,
"title": null,
"user_name": "USER_NAME",
"people_id": null,
"keep_alive_session_call": "2025-06-13 14:53:27",
"primary_acl_group": null,
"calendar_link": null,
"emergency_contact_name": null,
"force_relogin": null,
"_acl_comment": " u148",
"join_date": null,
"sponsor_id": null,
"onboarding_status": null,
"onboarding_steps": null,
"__parent_id": "",
"parent_id_user_name": null,
"__currency_id": "",
"__region_id": "",
"__salutation": "",
"__department": "",
"__organization_id": "ORGANIZATION_NAME",
"organization_id_business_key": "4E732CED3463D06DE0CA9A15B6153677",
"__people_id": "",
"people_id_name": null,
"__primary_acl_group": "",
"__sponsor_id": "",
"sponsor_id_user_name": null,
"owned_by_model": "owned_by_user",
"created_by_model": "created_by_user",
"modified_by_model": "modified_by_user",
"organization_id_model": "organizations",
"addresses": [],
"email_addresses": [],
"phone_numbers": [],
"roles_users": [
{
"created": "2025-02-19 21:49:26",
"created_by": "148",
"deleted": "0",
"description": null,
"flags": null,
"id": "1866",
"is_demo_data": "0",
"modified": "2025-04-02 13:53:46",
"modified_by": "1248",
"owned_by": "148",
"revision": "1",
"role_id": "645933bd-7ae0-4464-ac01-41cbac69033c",
"user_id": "1248",
"role_id_model": "roles",
"created_by_model": "created_by_user",
"modified_by_model": "modified_by_user"
},
{
"created": "2025-02-19 21:49:34",
"created_by": "148",
"deleted": "0",
"description": null,
"flags": null,
"id": "1867",
"is_demo_data": "0",
"modified": "2025-04-02 13:53:46",
"modified_by": "1248",
"owned_by": "148",
"revision": "1",
"role_id": "635af8d3-6030-4105-973c-409bac69033c",
"user_id": "1248",
"role_id_model": "roles",
"created_by_model": "created_by_user",
"modified_by_model": "modified_by_user"
},
{
"created": "2025-03-03 16:51:19",
"created_by": "148",
"deleted": "0",
"description": null,
"flags": null,
"id": "1924",
"is_demo_data": "0",
"modified": "2025-04-02 13:53:46",
"modified_by": "1248",
"owned_by": "148",
"revision": "1",
"role_id": "635af8c6-9dd0-4908-b5f0-4861ac69033c",
"user_id": "1248",
"role_id_model": "roles",
"created_by_model": "created_by_user",
"modified_by_model": "modified_by_user"
}
],
"images": {
"_acl": null,
"_acl_delete": null,
"_acl_edit": null,
"_acl_tmp": null,
"_acl_tmp_delete": null,
"_acl_tmp_edit": null,
"created": "2025-03-18 18:54:26",
"created_by": "1248",
"deleted": "0",
"description": null,
"field_type": "images",
"flags": null,
"id": "25020",
"imported": null,
"imported_by": null,
"is_demo_data": "0",
"is_public": "0",
"message_error": null,
"message_info": null,
"message_warn": null,
"mime_type": "image/jpeg",
"modified": "2025-04-02 13:53:46",
"modified_by": "1248",
"name": "60111.jpg",
"owned_by": null,
"path": "2025/04/02/13/67ed416a-fce4-4c16-a57b-40b9ac69033c.jpeg",
"primary_acl_group": null,
"related_to": "1248",
"related_to_model": "users",
"related_to_model_class_name": "\\module\\access_controls\\model\\users",
"revision": "1",
"storage_path": "webroot/img/uploads/",
"url": null,
"_acl_comment": null,
"tags": null,
"validation_summary": null,
"validation_summary_datetime": null,
},
"access_key": "67b651db-1bec-4d80-b148-49fbac69033c",
"enable_debug_mode": "0",
"enable_logger": null,
"force_password_reset_on_login": "0",
"hash_key": null,
"home_page": null,
"hour_format": "12",
"incoming_mail_server": null,
"incoming_mail_server_port": null,
"incoming_mail_server_require_ssl": "0",
"locale": "en_US",
"mail_server_password": null,
"mail_server_username": null,
"mobile_home_page": null,
"outgoing_mail_server": null,
"outgoing_mail_server_port": null,
"outgoing_mail_server_requires_ssl": "0",
"reset_password_token": "",
"reset_password_token_created": "0000-00-00 00:00:00",
"skin": "3_panel_fieldset_view",
"theme": "redmond",
"time_zone": "America/Toronto",
"incoming_mail_server_verified": null,
"outgoing_mail_server_verified": null,
"name_to_appear_on_sent_emails": null,
"send_as_email_address": null,
"incoming_mail_server_require_tls": "0",
"outgoing_mail_server_requires_tls": "0",
"force_logout": null,
"insert_signature_for_new_email": "0",
"insert_signature_for_reply_forward_email": "0",
"is_support_mailbox": null,
"autoresponse_template_id": null,
"support_mailbox_start_date": null,
"support_mailbox_end_date": null,
"__autoresponse_template_id": "",
"autoresponse_template_id_business_key": null,
"user_id_model": "users",
"roles": [
{
"id": "645933bd-7ae0-4464-ac01-41cbac69033c",
"name": "System Developer",
"business_key": "System Developer"
}
],
"organization": {
"_acl": " u627 g2641 u739",
"_acl_delete": " u627 g2641",
"_acl_edit": " u627 g2641 u739",
"_acl_tmp": "",
"_acl_tmp_delete": "",
"_acl_tmp_edit": "",
"created": "2024-06-06 21:15:05",
"created_by": "627",
"currency_id": "20",
"default_delete_acl_group_id": null,
"default_edit_acl_group_id": null,
"default_read_acl_group_id": null,
"deleted": "0",
"email": null,
"fax_number": null,
"flags": null,
"header_data": "Our ERP platform is built to revolutionize the way you manage your business",
"header_logo_width": null,
"id": "26",
"is_demo_data": "0",
"modified": "2024-11-01 13:50:24",
"modified_by": "148",
"name": "ORGANIZATION_NAME",
"owned_by": "627",
"parent_id": null,
"primary_address_line_1": "PRIMARY_ADDRESS_LINE_1",
"primary_address_line_2": "PRIMARY_ADDRESS_LINE_2",
"primary_address_line_3": "PRIMARY_ADDRESS_LINE_3",
"primary_city": "PRIMARY_CITY",
"primary_country": "PRIMARY_COUNTRY_ID",
"primary_phone_number": "PRIMARY_PHONE_NUMBER",
"primary_state": "PRIMARY_STATE",
"primary_zip": "PRIMARY_ZIP",
"revision": "13",
"sales_shop_id": null,
"secondary_phone_number": null,
"website": null,
"primary_acl_group": "2641",
"portal_url": null,
"_acl_comment": " u627 g2641",
"sequence": "0",
"company_id": "312",
"support_manager_id": null,
"default_legal_acl_group_id": null,
"default_accounting_acl_group_id": null,
"default_support_acl_group_id": null,
"email_header": "<div style=\"padding: 10px 30px; background-color: #fff; text-align: left;\">\r\n <img src=\"https://v2.crm.immigrate.fiyge.com/img/uploads/2024/10/07/15/6703fc4e-259c-4697-95fd-4f37ac69033c.png\" alt=\"Company Logo\" style=\"width: 269px; height: 99px;\" width=\"269px\" height=\"99px\">\r\n</div>",
"email_footer": "<div style=\"padding: 30px; background-color: #ef1c23; color: #ffffff; text-align: left;\">\r\n <p style=\"margin: 0; line-height: 16px; font-size: 14px;\">605 - 408 Browns Line,</p>\r\n <p style=\"margin: 0; line-height: 16px; font-size: 14px;\">Etobicoke, ON, M8W 0C3, Canada</p>\r\n\r\n</div>",
"enforce_ip_check": "0",
"enforce_geo_check": "1",
"fiscal_period_duration": null,
"initialize_organization": null,
"business_key": "4E732CED3463D06DE0CA9A15B6153677",
"parent_organization_code": null,
"app_description": null,
"app_key_features_1": null,
"app_key_features_2": null,
"app_key_features_3": null
},
"assigned_roles": [
"645933bd-7ae0-4464-ac01-41cbac69033c"
],
"rbac": [
"63598905-f950-4fe7-830d-4fe4ac69033c"
],
"is_admin": false,
"allow_public_signup": 1,
"is_multi_tenant": 1,
"is_developer": true,
"role_business_keys": {
"645933bd-7ae0-4464-ac01-41cbac69033c": "System Developer"
},
"assigned_groups": [
"2838",
"2214",
"1829",
"1828"
],
"groups_reporting_to_me": [],
"group_users_reporting_to_me": [],
"aros_reporting_to_me": [],
"aros": [
"u1248",
"g2838",
"g2214",
"g1829",
"g1828"
],
"primary_acl_groups": [],
"form_defaults": [],
"login_session_id": "684c3b7a-3594-4f73-a962-4a61ac69033c",
"role_key": "e09c6129d850ac72c6bf82b1fd2d55e7"
}
}
}