mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-07 04:18:38 +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);
|
||||
if (user == null) return this.StatusCode(403, "");
|
||||
|
||||
return this.Ok
|
||||
(
|
||||
$"Please stay on this screen.\n" +
|
||||
$"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" +
|
||||
$"Once approved, you may press X and continue.\n\n" +
|
||||
ServerSettings.Instance.EulaText
|
||||
);
|
||||
if (ServerSettings.Instance.UseExternalAuth)
|
||||
{
|
||||
return this.Ok
|
||||
(
|
||||
$"Please stay on this screen.\n" +
|
||||
$"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" +
|
||||
$"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")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue