Example #1
0
        public static void Init(string clientId, string clientVersion)
        {
            SDK = new FluxSDK(clientId, clientVersion);

            Console.WriteLine("Sdk has been successfully initialized.");

            if (SDK.CurrentUser != null)
            {
                Console.WriteLine("User has been logged in as: {0}", SDK.CurrentUser.FullName);
            }
        }
Example #2
0
        public void FluxLogin()
        {
            SDK               = new FluxSDK("8431c3aa-d216-4bdc-a0eb-93e40e5951f8"); // set SDK to the Client ID
            SDK.OnUserLogin  += SDK_OnUserLogin;                                     // login event
            SDK.OnUserLogout += SDK_UserLogout;                                      // logout event

            if (SDK.CurrentUser == null)
            {
                try
                {
                    // set client secret, and URL for the site that appears after login
                    SDK.Login("a6cfc8a6-41e2-4eb2-8311-f8256a2cea33", "https://flux.io/");
                }
                catch (Exception ex)
                {
                    Debug.Print(ex.Message.ToString());
                }
            }
            // if a user is loggedin, then log them out.
            else if (SDK.CurrentUser != null)
            {
                // SDK.Logout();
            }
        }