Exemple #1
0
        public async Task <IActionResult> FacebookAuth([FromBody] FacebookAuthRequest request)
        {
            var authResponse = await _customersService.FacebookLoginCustomerAsync(request.AccessToken);

            if (!authResponse.Success)
            {
                return(BadRequest(new AuthFailedResponse {
                    Errors = authResponse.Errors
                }));
            }
            return(Ok(new AuthSuccessResponse {
                Token = authResponse.Token
            }));
        }