Twitter v1 (Deprecated)
How to set up social connection with Twitter v1
Overview
Adding social connection with Twitter to your app with Clerk is done in a few steps - you only need to set the Client ID, Client Secret and Authorized redirect URI in your instance settings.
Clerk does not currently support preconfigured shared OAuth credentials for Twitter on development instances. You will have to provide custom credentials for both development and production instances, which includes generating your own Client ID and Client Secret using your Twitter Developer account. Don't worry, this guide will walk you through that process in just a few simple steps.
Before you start
- You need to create a Clerk Application in your Clerk Dashboard. For more information, check out our Set up your application guide.
- You need to have a Twitter Application set up so it can be used for Social connection. If you don't have a Twitter Application, click here for instructions on how to create one. If you already have one, please go to your Twitter app settings and ensure that the "Allow this app to be used to Sign in with Twitter?” option is enabled.
Configuring Twitter social connection
If you don't have an existing Twitter Application you've set up for social connection, you need to register a new one at the Twitter Developer Portal. Note that the process requires approval from Twitter before your new application can be used.
To do so, go to "Projects & Apps" and click "+ Add App" to create a new application. After entering a name, you'll be presented with your app's credentials: API Key and API Secret. Copy those values as you will be needing those shortly.
Navigate to the Clerk Dashboard. In the top navigation, select Configure. Then in the sidebar, select SSO Connections. Select the Add connection button, and select For all users. In the Choose provider dropdown, select Twitter. Toggle on Use custom credentials and paste the API Key and API Secret values which you copied in the previous step. Then, copy the Authorized redirect URI.
Navigate to your application settings screen and scroll down to the User authentication settings section and click Set up.
In the next screen you'll be presented with the user authentication settings. Make sure that both OAuth 1.0a and Request email address from users are enabled.
Also, enter the Authorized Redirect URI that you grabbed in the previous step from your Clerk instance's settings and insert it in the Callback URI setting. Your app's settings should like similar to the ones below. Fill any other required fields and click save. Your Twitter App is now ready.
Finally, select Add connection so that the settings are applied. Congratulations! Social connection with Twitter is now configured for your instance.
Feedback
Last updated on