Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 0 additions & 120 deletions README.md

This file was deleted.

12 changes: 12 additions & 0 deletions RobloxServer.Web/Code/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ static string RequestBaseUrl()
/// <summary>RCC-style shared secret passed as ?apiKey= by game servers (2015 behaviour).</summary>
public static string ApiKey { get { return Get("ApiKey", ""); } }

/// <summary>Facebook app id (public). The secret comes from the ROBLOXSERVER_FACEBOOK_SECRET environment variable.</summary>
public static string FacebookAppId { get { return Get("FacebookAppId", ""); } }

public static string FacebookAppSecret
{
get
{
string fromEnvironment = System.Environment.GetEnvironmentVariable("ROBLOXSERVER_FACEBOOK_SECRET");
return !string.IsNullOrEmpty(fromEnvironment) ? fromEnvironment : Get("FacebookAppSecret", "");
}
}

public static bool RegistrationOpen { get { return GetBool("RegistrationOpen", true); } }

/// <summary>User names that are site administrators ("Roblox" staff).</summary>
Expand Down
3 changes: 3 additions & 0 deletions RobloxServer.Web/Code/Data/Models.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class User
/// <summary>"Male", "Female" or null (2013 landing page signup).</summary>
public string Gender { get; set; }

/// <summary>Facebook user id when the account signs in with Facebook (null otherwise).</summary>
public string FacebookId { get; set; }

/// <summary>Set only if the user consented, at signup, to link their real Roblox username.</summary>
public bool RobloxVerified { get; set; }

Expand Down
1 change: 1 addition & 0 deletions RobloxServer.Web/Landing.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
</asp:Panel>
<br />
<div id="login-footer" class="sign-up-row">
<div style="margin-bottom:6px"><% if (!string.IsNullOrEmpty(RobloxServer.Config.FacebookAppId)) { %><a href="<%: ResolveUrl("~/Login/Facebook.ashx") %>" class="btn-medium btn-neutral" style="background:#3b5998;color:#fff">Login with Facebook</a><% } %></div>
<div>Don't have an account? <a href="#" id="show-signup">Sign up</a></div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions RobloxServer.Web/Login.aspx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<div id="forgotPasswordPanel">Forgot your password? Ask an administrator.</div>
<div id="signInButtonPanel">
<asp:Button ID="LoginButton" runat="server" Text="Sign In" CssClass="btn-medium btn-neutral" OnClick="LoginButton_Click" />
<% if (!string.IsNullOrEmpty(RobloxServer.Config.FacebookAppId)) { %><a href="<%: ResolveUrl("~/Login/Facebook.ashx") %>" class="btn-medium btn-neutral" style="margin-left:6px;background:#3b5998;color:#fff">Login with Facebook</a><% } %>
</div>
<div class="clearFloats"></div>
</div>
Expand Down
1 change: 1 addition & 0 deletions RobloxServer.Web/Login/Facebook.ashx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<%@ WebHandler Language="C#" CodeBehind="Facebook.ashx.cs" Class="RobloxServer.Handlers.Login.Facebook" %>
Loading