cleanings
This commit is contained in:
parent
7ab69080a9
commit
fa7d5650ff
12 changed files with 33 additions and 36 deletions
|
|
@ -132,8 +132,8 @@ namespace Yavsc
|
|||
var gvents = new OAuthEvents();
|
||||
YavscGoogleAppOptions = new YavscGoogleOptions
|
||||
{
|
||||
ClientId = Configuration["Authentication:Google:ClientId"],
|
||||
ClientSecret = Configuration["Authentication:Google:ClientSecret"],
|
||||
ClientId = Configuration["Authentication:Google:ServiceAccount:client_id"],
|
||||
ClientSecret = Configuration["Authentication:Google:SerivceAccount:client_secret"],
|
||||
AccessType = "offline",
|
||||
Scope = { "profile", "https://www.googleapis.com/auth/plus.login",
|
||||
"https://www.googleapis.com/auth/admin.directory.resource.calendar",
|
||||
|
|
@ -150,7 +150,7 @@ namespace Yavsc
|
|||
var gcontext = context as GoogleOAuthCreatingTicketContext;
|
||||
context.Identity.AddClaim(new Claim(YavscClaimTypes.GoogleUserId, gcontext.GoogleUserId));
|
||||
var dbContext = serviceScope.ServiceProvider.GetService<ApplicationDbContext>();
|
||||
|
||||
/*
|
||||
var store = serviceScope.ServiceProvider.GetService<IDataStore>();
|
||||
await store.StoreAsync(gcontext.GoogleUserId, new TokenResponse {
|
||||
AccessToken = gcontext.TokenResponse.AccessToken,
|
||||
|
|
@ -158,7 +158,7 @@ namespace Yavsc
|
|||
TokenType = gcontext.TokenResponse.TokenType,
|
||||
ExpiresInSeconds = int.Parse(gcontext.TokenResponse.ExpiresIn),
|
||||
IssuedUtc = DateTime.Now
|
||||
});
|
||||
}); */
|
||||
await dbContext.StoreTokenAsync (gcontext.GoogleUserId,
|
||||
gcontext.TokenResponse.Response,
|
||||
gcontext.TokenResponse.AccessToken,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue