<!--
  ~ 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-config">
    <title>Social Login Config</title>
    <para>
        To enable log in with a social network you need to enable social login for your realm and configure one or more
        social providers.
    </para>

    <section>
        <title>Enable social login</title>
        <para>
            To configure social login, open the <literal>Keycloak Admin Console</literal>, select your realm from the
            drop-down box in the top left corner. In the <literal>Login Options</literal> section click on
            <literal>Social login</literal> to set it to <literal>ON</literal>. Click save settings, then click on
            <literal>Social</literal> in the menu at the top.
        </para>
        <para>
            To enable a social provider select the provider you want from the drop-down and click on
            <literal>Add Provider</literal>. Then continue to the section below that provides specific instructions for
            the provider you are adding.
        </para>
    </section>

    <section>
        <title>Social-only login</title>
        <para>
            It's possible to configure a realm to only allow social login. To do this open the <literal>Keycloak Admin Console</literal>,
            select your realm from the drop-down box in the top left corner. Click the <literal>Credentials</literal> tab, and
            click on the <literal>x</literal> next to <literal>password</literal> in the <literal>Required User Credentials</literal>.
            This will disable login with username and password.
        </para>
    </section>

    <section id="social-callbackurl">
        <title>Social Callback URL</title>
        <para>
            There is a single callback url used by all realms and social providers. This makes it possible to share
            the configuration for a social network between multiple realms. An example callback url is
            <literal>http://localhost:8080/auth/rest/social/callback</literal>. To get the callback url for your server
            replace <literal>http://localhost:8080</literal> with the base address of your server. You can also
            find the callback url in the Keycloak Admin Console under social settings.
        </para>
    </section>
</section>