示例#1
0
 public void Login(string username, string password)
 {
     try
     {
         // need to call API method to log in
         GoogleUser user = LoginWithEmailAndPassword(username, password);
         // need to change the Google user into an Auth user
         defaultUser = new DefaultUser(user.GetName(), user.GetEmail());
     }
     catch (Exception e)
     {
         Console.WriteLine("Error: " + e.Message);
     }
 }
示例#2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Username: "******"Password: "******"Logged in - email is " + user.GetEmail());
            }
            else
            {
                Console.WriteLine("Login failed");
            }
        }