feat(backend): start authentication controllers
This commit is contained in:
parent
493a6e4d29
commit
25540f2de2
15 changed files with 777 additions and 17 deletions
|
@ -6,9 +6,11 @@ namespace Foxnouns.Backend.Controllers.Authentication;
|
|||
[Route("/api/v2/auth/discord")]
|
||||
public class DiscordAuthController(Config config, DatabaseContext db) : ApiControllerBase
|
||||
{
|
||||
[HttpPost("url")]
|
||||
public async Task<IActionResult> AuthenticationUrl()
|
||||
private void CheckRequirements()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (config.DiscordAuth.ClientId == null || config.DiscordAuth.ClientSecret == null)
|
||||
{
|
||||
throw new ApiError.BadRequest("Discord authentication is not enabled on this instance.");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue