Authentication with Facebook from a Control application

Authentication with Facebook from a Control application

In the Control application, there is a feature on the left side menu called "Authentications". In this feature, there are authentication options for the Control application with Facebook, Twitter and PayPal.

For this article, we'll learn how to use Facebook authentication.

1 - After creating a Control application, we will need to create at least one field in the Control application, and then go to the "Authentications" option on the left side menu of the Control application, as highlighted in the image below:



2 - Right in the first option, we will find the Facebook block with the fields that must be filled in for the authentication to work. These fields can be generated through the Facebook page for Developers, and to know the step by step of this generation, you can access the article link below that shows how to generate the App ID and Secret.


3 - In addition to performing the above credentials generation procedure, we also need to enable the URL of our Control application to avoid returning the message described in the image below when we run our application and use Facebook authentication:



To do this, we must go to the option "Login from Facebook -> Settings" on the Facebook for Developers page, and then enable the option "Force OAuth reauthentication on the Web" and add the URL of our Control application in "URls valid OAuth redirect":



4 - Before inserting the information in the App ID and Secret fields, let's create a method that will be inserted later in the Method Return field, which is used for validation after returning from the webservice, as defined in the field description itself. We click on the "+" icon:



5 - We will call the method name "facebook", click on the "Create" button. For the example, let's add a simple alert to the method using the sc_alert() macro just for this validation:



6 - We went back to the "Authentications" option after saving the method, and selected the facebook method in the "Method Return" field that had just been created. In addition, we inserted the credentials that were generated on the Facebook for Developers page, according to the third step:



7 - Once that's done, let's go to the "Toolbar" option on the left side menu of the Control application, as we will need to enable the Facebook authentication button taking it from the left column to the right:



8 - We save the application, generate the source code and execute it. With the application running, let's click on the "Facebook" button that has been enabled for the application. We will be redirected to enter our Facebook account password, and then the authentication will take place:


    • Related Articles

    • Generating Credentials for Authentication with Facebook

      In this article, we will learn how to generate credentials (App ID and Secret) for authentication and access to our project developed in ScriptCase through Facebook. 1 - The first step is to create a Facebook account as a "developer". We need to ...
    • Security Module Two-Factor Authentication - Google Authenticator

      Google Authenticator generates 2-step verification codes on your smartphone. Two-Step Verification provides greater security for your account as it requires a second verification step at login. In addition to the password, you will need a code ...
    • How to create an application link

      Application Link: This is used to link the application with any other type of project application. This type of link is associated with insert and update events. How to do an application link: Open your application and go to the “Application Links” ...
    • Report on the Application List Scriptcase

      A major differential Scriptcase are your management reports that help a lot in analyzing project performance in terms of productivity. Today we will talk a bit about other report that has a function very similar, the Report Application List. With it ...
    • Generating Credentials for Authentication with Twitter

      In this article, we will learn how to generate credentials (API Key and API Key Secret) for authentication and access to our project developed in ScriptCase through Twitter. Account Creation 1 - The first step is to create a Twitter account through ...