Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

3.0 KB
Raw Blame
@model Authentication.Facebook.Models.ConfigurationModel
@{
    Layout = "_AdminLayout";
    ViewBag.Title = "Facebook authentication";
}
<input id="active-menu-item" type="hidden" value="/Admin/ExternalAuthentication/Methods"/>
@* the setup steps stay a note - a message, not a heading; the app id and secret come from
   App_Settings.json and are shown read-only. The title is the plugin's friendly name, which
   _ConfigurePlugin used to print *@
<form asp-controller="FacebookAuthenticationSettings" asp-area="Admin" asp-action="Configure" method="post">
    <admin-page title="Facebook authentication" icon="bi-facebook">
        <page-actions>
            <button type="submit" name="save" class="btn btn-primary">
                <i class="bi bi-check-lg"></i> @Loc["Admin.Common.Save"]
            </button>
        </page-actions>

        <div class="note note-info">
            <p>
                To configure authentication with Facebook follow these steps:<br/>
                <br/>
                1. Navigate to the <a href="https://developers.facebook.com/apps" target="_blank">Facebook for Developers</a> page and sign in. If you don't already have a Facebook account, use the <b>Sign up for Facebook</b> link on the login page to create one.<br/>
                2. Tap the <b>+ Add a New App button</b> in the upper right corner to create a new App ID. (If this is your first app with Facebook, the text of the button will be <b>Create a New App</b>.)<br/>
                3. Fill out the form and tap the <b>Create App ID button</b>.<br/>
                4. The <b>Product Setup</b> page is displayed, letting you select the features for your new app. Click <b>Get Started</b> on <b>Facebook Login</b>.<br/>
                5. Click the <b>Settings</b> link in the menu at the left, you are presented with the <b>Client OAuth Settings</b> page with some defaults already set.<br/>
                6. Enter "@("https://yourstore.com/signin-facebook")" into the <b>Valid OAuth Redirect URIs</b> field.<br/>
                7. Click <b>Save Changes</b>.<br/>
                8. Click the <b>Dashboard</b> link in the left navigation.<br/>
                9. Copy your App ID and App secret below.<br/>
            </p>
            <p>
                <br/><br/>
                To edit facebook settings in the grandnode application, please open the file App_Settings.json,
                find section FacebookSettings and enter the correct values.
            </p>
        </div>
        <admin-card>
            <div class="grand-fields grand-fields--2col">
                <admin-field asp-for="ClientId">
                    <input asp-for="ClientId" type="text" disabled class="form-control text-box single-line"/>
                </admin-field>
                <admin-field asp-for="ClientSecret">
                    <input asp-for="ClientSecret" type="text" disabled class="form-control text-box single-line"/>
                </admin-field>
                <admin-field asp-for="DisplayOrder" size="sm"/>
            </div>
        </admin-card>
    </admin-page>
</form>