oAuth 2.0

OAuth 2.0 (Open Authorization 2.0) is an authorization protocol used by users to grant access to an application or service. OAuth 2.0 is a popular authorization method, especially for web-based and mobile applications. OAuth 2.0 allows an application to manage users' access to specific resources (like a social media account or cloud storage service) and securely authorize users without sharing their credentials.

OAuth 2.0 consists of four main components:

  • Resource Owner: The resource owner is the user who grants access. For example, if a user wants to grant access to their Facebook account to another application, this user is the resource owner.

  • Client: The client is the application that wants to obtain access from the resource owner. The client represents the party that wants to access the resources.

  • Authorization Server: The authorization server verifies the identity of the resource owner and grants access permission. This server manages operations such as verifying the user's identity, validating authorization credentials, and creating an access token.

  • Resource Server: The resource server hosts the resources to which access is granted. For example, in a photo-sharing application, the resource server stores the user's photos.

While configuring the Backend for your application developed with Kuika, you can include OAuth 2.0 within the backend configuration.

1. Add oAuth 2.0 as an Authentication Provider

Click on the Configuration Manager view mode in the Header. Name the Configuration Manager and create a new configuration setting.

From App Settings, navigate to the Authentication & Authorization section, and then to the Authentication Provider area.

Click ADD NEW from the dropdown. Choose oAuth 2.0 from the Type area.

With Kuika, you can add oAuth 2.0 as an authentication provider to your applications.

On the oAuth 2.0 screen, fill in the required information.

  • Assign a name for the authentication provider in the text input box next to the Name heading.

  • The next step for oAuth 2.0 is to add the details in the Request dropdown.

  • First, you need to enter the Access Token URL to access/login through oAuth 2.0.

  • Then, specify how long it will take for the received Access Token to time out in minutes in the text input box next to Expiration in Minutes. If you don't enter the Expiration in Minutes information, Kuika will default to a duration of 30 minutes.

  • The next step is to enter the Client ID and Client Secret provided by the server.

  • After entering the Client ID and Client Secret, select whether you want to send the Client ID and Client Secret in the Header or Body using the dropdown menu next to Client Authentication.

Make your choice according to how oAuth 2.0 operates on the other end (header/body). After making your choice, if you have a Scope, enter it as a String using the text input box next to Scope.

Another piece of information you need to add for oAuth 2.0 is the Response information. Upon executing the entered Request details, a Response will be returned. Some information is needed to match the returned Response in Kuika.

  • This information includes Access Token, User Name, First Name, Last Name, and Refresh Token. You can access this information from the .json file in the returned value.

  • The Refresh Token of oAuth 2.0 continues with a Refresh Token via the Access Token URL, so Kuika can automatically call the Refresh Token in the background. Therefore, you don't need to re-enter a Refresh Token URL.

After entering the required information, click the CREATE button to establish the authentication provider.

Last updated