oAuth 2.0

OAuth 2.0 (Open Authorisation 2.0) is an authorisation protocol used when granting users access to an application or service. OAuth 2.0 is a popular authorisation method, especially for web-based and mobile applications. OAuth 2.0 allows an application to manage users' access to certain resources (such as a social media account or cloud storage service) and to securely authorise users to access those resources without sharing credentials.

OAuth 2.0 consists of four key components:

  • Resource Owner: The resource owner is the user who grants access. For example, if a user wants to grant access to his/her Facebook account to another application, this user is the resource owner.
  • Client: The client is the application to which the resource owner wants to grant access. The client represents the party that wants to access the resources.
  • Authorisation Server: The authorisation server authenticates the resource owner and grants access. This server manages processes such as verifying the user's identity and authorisation information and creating an access token.
  • Resource Server: A resource server is a server that hosts resources to which access is granted. For example, a photo sharing application resource server stores the user's photos.

While configuring the backend of the application you developed with Kuika, you can add oAuth 2.0 to the backend configuration.

1. Add oAuth 2.0 as Authentication Provider

Click the Configuration Manager view mode in the Header area. Create a new configuration setting by naming Configuration Manager.

Configuration Manager View Mode

In App Settings, in Authentication & Authorisation field, go to Authentication Provider field.

:Authentication Provider yapılandırması ekleme ekranı

Add an Authentication Provider configuration

Click ADD NEW in the Selectbox. Select oAuth 2.0 from the Type field.

You can add oAuth 2.0 as an authentication provider to the applications you develop with Kuika.

 oAuth 2.0 ekranı

Entering oAuth information on the pop-up that opens

On the oAuth 2.0 screen, you must fill in the requested information to make the settings.

  • Name the authentication provider via the text input box opposite the Name heading.
  • The next thing you need to do for oAuth 2.0 is to add the information in the Request drop-down menu.

oAuth2.0 Request information input

  • First of all, you must enter the Access Token URL in order to log in / get Access Token from oAuth 2.0.
  • Then enter the time after which the received Access Token will expire in minute type via the text input box opposite Expiration in Minutes. If you do not enter Expiration in Minutes, Kuika will set a time of 30 minutes by default.
  • The next step is to enter the Client ID and Client Secret information provided by the server, which is required to invoke oAuth 2.0.
  • After entering the Client ID and Client Secret information, in the next step, you must select whether you want to send the Client ID and Client Secret information in the Header or Body via the drop-down menu opposite Client Authentication.

oAuth2.0 Client Authentication selection

  • You must perform the selection process in accordance with the working type (header/body) of oAuth 2.0 on the other side.
  • After the selection process, if you have a Scope, you must enter the Scope in String type via the text input box opposite the Scope.
  • Another information you need to add for oAuth 2.0 is Response information.
  • A Response will be returned by executing the Request information entered.
  • Some information is needed to match the returned Response in Kuika.

Entering Response data

  • This information is Access Token, User Name, First Name, Last Name and Refresh Token. You can access this information from the .json file in the return value.
  • Since oAuth 2.0's Refresh Token continues with Refresh Token via Acces Token URL, Kuika can automatically call Refresh Token in the background. Thus, you do not need to enter a Refresh Token URL again.

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