social-twitter.xml

55 lines | 2.685 kB Blame History Raw Download
<!--
  ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
  ~ and other contributors as indicated by the @author tags.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<section id="social-twitter">
    <title>Twitter</title>
    <para>
        To enable login with Twtter you first have to create an application in the
        <link xlink:href="https://dev.twitter.com/apps">Twitter Developer Console</link>. Then you need to copy
        the consumer key and secret into the Keycloak Admin Console.
    </para>
    <orderedlist>
        <listitem>
            <para>
                Log in to the <link xlink:href="https://dev.twitter.com/apps">Twitter Developer Console</link>. Click the
                <literal>Create a new application</literal> button. Use any value for <literal>Name</literal>,
                <literal>Description</literal> and <literal>Website</literal> you want. Insert the social callback url
                in <literal>Callback URL</literal>. Then click <literal>Create your Twitter application</literal>.
            </para>
        </listitem>
        <listitem>
            <para>
                Now click on <literal>Settings</literal> and tick the box <literal>Allow this application to be used to Sign in with Twitter</literal>,
                then click on <literal>Update this Twitter application's settings</literal>.
            </para>
        </listitem>
        <listitem>
            <para>
                Now click <literal>API Keys</literal> tab. Copy <literal>API key</literal> and <literal>API secret</literal> from the
                <link xlink:href="https://dev.twitter.com/apps">Twitter Developer Console</link> into the settings
                page in the Keycloak Admin Console as the <literal>Key</literal> and <literal>Secret</literal>. Then click
                <literal>Save</literal> in the Keycloak Admin Console to enable login with Twitter.
            </para>
        </listitem>
    </orderedlist>
    <tip>
        <para>
            Twitter doesn't allow <literal>localhost</literal> in the redirect URI. To test on a local server
            replace <literal>localhost</literal> with <literal>127.0.0.1</literal>.
        </para>
    </tip>
</section>