Пример #1
0
        public async Task <Users> Post(Users user)
        {
            var apiKey   = _configuration.GetSection("FirebaseConfig:ApiKey").Value;
            var response = await _auth.LoginWithEmailPassword(user.Email, user.Password, apiKey).ConfigureAwait(false);

            var   data     = JsonConvert.DeserializeObject <Users>(response);
            Users userData = await _fireBaseRepo.GetUserById(data.LocalId).ConfigureAwait(false);

            userData.IdToken = data.IdToken;
            return(userData);
        }
Пример #2
0
 public async Task <Users> Get(string id)
 {
     return(await _fireBaseRepo.GetUserById(id).ConfigureAwait(false));
 }