2016-05-26 16:09:04 +00:00
2021-03-19 21:31:19 +00:00
[[_twitter]]
2016-05-26 16:09:04 +00:00
==== Twitter
2019-01-18 19:17:57 +00:00
There are a number of steps you have to complete to be able to enable login with Twitter. First, go to the `Identity Providers` left menu item
2016-06-05 21:22:42 +00:00
and select `Twitter` from the `Add provider` drop down list. This will bring you to the `Add identity provider` page.
2016-05-26 21:33:13 +00:00
.Add Identity Provider
2017-08-28 12:50:14 +00:00
image:{project_images}/twitter-add-identity-provider.png[]
2016-05-26 21:33:13 +00:00
You can't click save yet, as you'll need to obtain a `Client ID` and `Client Secret` from Twitter. One piece of data you'll need from this
2017-08-28 12:50:14 +00:00
page is the `Redirect URI`. You'll have to provide that to Twitter when you register {project_name} as a client there, so
2016-05-26 21:33:13 +00:00
copy this URI to your clipboard.
2018-12-14 09:09:01 +00:00
To enable login with Twtter you first have to create an application in the https://developer.twitter.com/apps/[Twitter Application Management].
2016-05-26 16:09:04 +00:00
2016-05-26 21:33:13 +00:00
.Register Application
2017-08-28 12:50:14 +00:00
image:images/twitter-app-register.png[]
2016-05-26 21:33:13 +00:00
Click on the `Create New App` button. This will bring you to the `Create an Application` page.
2016-05-26 16:09:04 +00:00
2016-05-26 21:33:13 +00:00
.Register Application
2017-08-28 12:50:14 +00:00
image:images/twitter-app-create.png[]
2016-05-26 16:09:04 +00:00
2016-05-26 21:33:13 +00:00
Enter in a Name and Description. The Website can be anything, but cannot have a `localhost` address. For the
2017-08-28 12:50:14 +00:00
`Callback URL` you must copy the `Redirect URI` from the {project_name} `Add Identity Provider` page.
2016-05-26 16:09:04 +00:00
2019-01-18 19:17:57 +00:00
WARNING: You cannot use `localhost` in the `Callback URL`. Instead replace it with `127.0.0.1` if you are trying to test drive Twitter login on your laptop.
2016-05-26 16:09:04 +00:00
2016-05-26 21:33:13 +00:00
After clicking save you will be brought to the `Details` page.
2016-05-26 16:09:04 +00:00
2016-05-26 21:33:13 +00:00
.App Details
2017-08-28 12:50:14 +00:00
image:images/twitter-details.png[]
2016-05-26 16:09:04 +00:00
2016-05-26 21:33:13 +00:00
Next go to the `Keys and Access Tokens` tab.
2016-05-26 16:09:04 +00:00
2016-05-26 21:33:13 +00:00
.Keys and Access Tokens
2017-08-28 12:50:14 +00:00
image:images/twitter-keys.png[]
2016-05-26 16:09:04 +00:00
2017-08-28 12:50:14 +00:00
Finally, you will need to obtain the API Key and secret from this page and copy them back into the `Client ID` and `Client Secret` fields on the {project_name} `Add identity provider` page.