Renamed project.

This commit is contained in:
Patrick Fic
2020-05-27 08:59:48 -07:00
parent 75739656c4
commit a8a8998250
44 changed files with 106 additions and 101 deletions

View File

@@ -6,7 +6,7 @@ using System.Threading.Tasks;
using Firebase.Auth;
using System.Timers;
namespace BodyshopUploader.Utils
namespace BodyshopPartner.Utils
{
public static class Auth
{
@@ -25,9 +25,8 @@ namespace BodyshopUploader.Utils
{
authlink = await ap.SignInWithEmailAndPasswordAsync(Username, Password);
authlink.FirebaseAuthRefreshed += Authlink_FirebaseAuthRefreshed;
logger.Trace("Firebase Auth Token {0}.", authlink.FirebaseToken);
logger.Trace("Firebase Refresh Token {0}.", authlink.RefreshToken);
logger.Trace("Firebase Auth Token expires in {0} seconds.", authlink.ExpiresIn);
tokenTimer.Interval = (authlink.ExpiresIn - 600) * 1000; //Set the token to refresh 10 minutes before it has to.
logger.Trace("Refresh timer interval set to {0}ms", (authlink.ExpiresIn - 600) * 1000);
@@ -81,7 +80,7 @@ namespace BodyshopUploader.Utils
//Gotta do some stuff now that i got a new token!
//Maybe the token auto refreshes?
logger.Info("Timer Old Token {0}", authlink.FirebaseToken);
authlink = await ap.SignInWithEmailAndPasswordAsync(U, P);
authlink = await authlink.GetFreshAuthAsync();
logger.Info("new Token {0}", authlink.FirebaseToken);
tokenTimer.Stop();
tokenTimer.Interval = (authlink.ExpiresIn - 600) * 1000; //Set the token to refresh 10 minutes before it has to.