@@ -43,36 +43,36 @@ public AuthController(
4343 _tokenManager = tokenManager ?? throw new ArgumentNullException ( nameof ( tokenManager ) ) ;
4444 }
4545
46- // [HttpPost("/api/_auth/signin")]
47- // public async Task<IActionResult> SignIn([FromBody] SignInBodyRequest body, CancellationToken cancellationToken)
48- // {
49- // var found = await _authService.SendSignInEmailAsync(body.Email.Trim(), cancellationToken);
50-
51- // if (!found)
52- // return NotFound(new { });
53-
54- // return Ok(new { });
55- // }
56-
57- // [HttpPost("/api/_auth/register")]
58- // [EnableRateLimiting("SignUp")]
59- // public async Task<IActionResult> Register([FromBody] RegisterBodyRequest body, CancellationToken cancellationToken)
60- // {
61- // await _authService.SendRegisterEmailAsync(body.Name.Trim(), body.Email.Trim(), cancellationToken);
62- // return Ok(new { });
63- // }
64-
65- // [HttpGet("/api/_auth/github")]
66- // public IActionResult GitHub()
67- // {
68- // return Challenge(new AuthenticationProperties { RedirectUri = $"{_env.SelfBaseUrl}/" }, "github");
69- // }
70-
71- // [HttpGet("/api/_auth/google")]
72- // public IActionResult Google()
73- // {
74- // return Challenge(new AuthenticationProperties { RedirectUri = $"{_env.SelfBaseUrl}/" }, "google");
75- // }
46+ [ HttpPost ( "/api/_auth/signin" ) ]
47+ public async Task < IActionResult > SignIn ( [ FromBody ] SignInBodyRequest body , CancellationToken cancellationToken )
48+ {
49+ var found = await _authService . SendSignInEmailAsync ( body . Email . Trim ( ) , cancellationToken ) ;
50+
51+ if ( ! found )
52+ return NotFound ( new { } ) ;
53+
54+ return Ok ( new { } ) ;
55+ }
56+
57+ [ HttpPost ( "/api/_auth/register" ) ]
58+ [ EnableRateLimiting ( "SignUp" ) ]
59+ public async Task < IActionResult > Register ( [ FromBody ] RegisterBodyRequest body , CancellationToken cancellationToken )
60+ {
61+ await _authService . SendRegisterEmailAsync ( body . Name . Trim ( ) , body . Email . Trim ( ) , cancellationToken ) ;
62+ return Ok ( new { } ) ;
63+ }
64+
65+ [ HttpGet ( "/api/_auth/github" ) ]
66+ public IActionResult GitHub ( )
67+ {
68+ return Challenge ( new AuthenticationProperties { RedirectUri = $ "{ _env . SelfBaseUrl } /" } , "github" ) ;
69+ }
70+
71+ [ HttpGet ( "/api/_auth/google" ) ]
72+ public IActionResult Google ( )
73+ {
74+ return Challenge ( new AuthenticationProperties { RedirectUri = $ "{ _env . SelfBaseUrl } /" } , "google" ) ;
75+ }
7676
7777 [ HttpGet ( "/api/_auth/authentik" ) ]
7878 public IActionResult Authentik ( )
0 commit comments