mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-10 05:48:39 +00:00
Fix external auth message showing up when its disabled
This commit is contained in:
parent
b7c5ccbf8c
commit
8edc276767
1 changed files with 13 additions and 8 deletions
|
@ -30,14 +30,19 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
||||||
User user = await this.database.UserFromGameRequest(this.Request, true);
|
User user = await this.database.UserFromGameRequest(this.Request, true);
|
||||||
if (user == null) return this.StatusCode(403, "");
|
if (user == null) return this.StatusCode(403, "");
|
||||||
|
|
||||||
return this.Ok
|
if (ServerSettings.Instance.UseExternalAuth)
|
||||||
(
|
{
|
||||||
$"Please stay on this screen.\n" +
|
return this.Ok
|
||||||
$"Before continuing, you must approve this session at {ServerSettings.Instance.ExternalUrl}.\n" +
|
(
|
||||||
$"Please keep in mind that if the session is denied you may have to wait up to 5-10 minutes to try logging in again.\n" +
|
$"Please stay on this screen.\n" +
|
||||||
$"Once approved, you may press X and continue.\n\n" +
|
$"Before continuing, you must approve this session at {ServerSettings.Instance.ExternalUrl}.\n" +
|
||||||
ServerSettings.Instance.EulaText
|
$"Please keep in mind that if the session is denied you may have to wait up to 5-10 minutes to try logging in again.\n" +
|
||||||
);
|
$"Once approved, you may press X and continue.\n\n" +
|
||||||
|
ServerSettings.Instance.EulaText
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.Ok($"You are now logged in as {user.Username} (id: {user.UserId}).\n\n" + ServerSettings.Instance.EulaText);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("notification")]
|
[HttpGet("notification")]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue