Skip to content

Twitter Setup

Configuring Twitter for apps using global keys differs from apps using app-specific keys.

Pre-requisites

  • Log in to the Arcana Developer Dashboard: https://dashboard.arcana.network

  • Before you can configure, the app should be registered by creating a new app entry in the dashboard through the 'Create New App' wizard.

Register & Configure

Each app is assigned a unique Client ID upon registration. A default Testnet configuration is linked with the registered app. No social authentication providers are enabled for the app. Passwordless login is enabled for all registered apps automatically.

A registered app can be deployed only at the Arcana Testnet. Developers must create a Mainnet profile using the Arcana Developer Dashboard to deploy a registered app on the Mainnet. Each profile can use identical or different Social Auth settings.

App Identifier
Unique App Identifier: ClientID

Global Keys

Apps that require global keys feature do not need to configure the Social Auth settings in the Arcana Developer Dashboard.

User onboarding via Twitter is automatically turned on for the app when global keys are enabled.

Global Keys Setting
Global Keys Setting

Global Keys Configuration Change

In the earlier versions of the Arcana Auth SDK, apps using global keys were required to configure Social Auth settings for the providers. This behavior has changed in the latest release of the Arcana Auth SDK.

If an app was configured for any social login providers and switches over from app-specific to global keyspace later, the Social Auth settings will be disabled altogether.

Global Keys, Social Auth Settings Disabled
Global Keys: Social Auth Settings Disabled

App-specific Keys

Follow these steps to configure the Social Auth settings and enable user onboarding via Twitter. It requires developers to use the Arcana Developer Dashboard and the Twitter Developer Account.

Step 1: Get Redirect URI

Select the app in the Manage Apps dashboard screen and click Testnet/Mainnet to configure Twitter in the respective configuration profile. Go to Configure > Social Auth. Copy the redirect URI shown on the top right.

Copy Redirect URI
Copy Redirect URI

Do not close the Social Auth browser tab in the Arcana Developer Dashboard. Open another tab and set up Twitter OAuth.

Step 2: Use the Twitter Developer Console

Twitter Elevated Access Required

Developers must have a Twitter Developer Account and Twitter Elevated Access. This is required to configure and use the Twitter Developer Portal for generating Twitter OAuth credentials.

Go to the Twitter Developer Portal and create a new app entry for setting up the OAuth credentials for the app.

Twitter Developer Console
Twitter Developer Console

Select an appropriate environment and create a new name for the app on the Twitter Developer Portal.

Create Twitter App Entry
Create Twitter App Entry

In the Keys and Tokens tab, the API Key and API Key Secret values are generated automatically for your newly created app entry. Make sure you copy both of these as they will be needed later for setting up Twitter in the Arcana Developer Dashboard.

Twitter Keys and Secret
Twitter Keys and Secret

After this, you need to select OAuth Setup as shown below and configure the Redirect URI and the app deployment website domain.

Setup App OAuth
Setup App OAuth

When you click Setup, you will see OAuth options. For the Type of App field, select the Web App option.

Select Twitter Web App Option
Select Twitter Web App Option

In the App Info section, select the Redirect URI field. You need to specify the app callback URL in the Twitter settings as the redirect URI copied from the Arcana Developer Dashboard in the previous step.

Set Twitter App Callback URL
Set Twitter App Callback URL

Specify all the fields appropriately. Do not leave the optional fields empty.

  • Website domain
  • Organization details
  • Terms of Service
  • Privacy Policy

An-caution

Arcana Auth SDK requires the Twitter user's email ID to verify the logged-in user's credentials. To enable this, Twitter makes it necessary that the Privacy Policy and Terms of Service are appropriately provided while creating a new app entry. For details, see here.

Make sure you save all the settings.

An-tip

If you miss copying the API Key and the API Key Secret earlier, you can go App Settings section in the Twitter Developer Dashboard. Refer to the Keys and Tokens tab. You will see under the Consumer Keys section, there is an option to regenerate the API key and secret. Make sure you copy both of these details.

These details will be required in the next step while completing the app configuration using the Arcana Developer Dashboard.

Step 3: Update Twitter Social Auth Settings

In the Arcana Developer Dashboard, click Configure > Social Auth. Refer to the empty fields next to the "Twitter" setting. Paste the API Key assigned by Twitter, in the previous step.

Update Twitter API Key
Update Twitter API Key

Save the Social Auth settings.

You are all set with the Twitter configuration!


Last update: March 15, 2024 by shaloo, shaloo