Skip to content

Commit ec83398

Browse files
committed
misc changes
1 parent a2dc633 commit ec83398

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

src/BlazorEcommerce.Identity/Service/AuthService.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Ardalis.GuardClauses;
2-
using BlazorEcommerce.Application.Contracts.Identity;
1+
using BlazorEcommerce.Application.Contracts.Identity;
32
using BlazorEcommerce.Application.Model;
43
using BlazorEcommerce.Shared.Auth;
54
using BlazorEcommerce.Shared.Constant;
@@ -13,7 +12,6 @@
1312
using System.Security.Claims;
1413
using System.Security.Cryptography;
1514
using System.Text;
16-
using System.Threading;
1715

1816
namespace BlazorEcommerce.Identity.Service
1917
{
@@ -56,6 +54,8 @@ public async Task<IResponse> Login(UserLogin request)
5654

5755
string refreshToken = CreateRefreshToken();
5856

57+
await _userManager.RemoveLoginAsync(user, AuthenticatorStoreLoginProvider, refreshToken);
58+
5959
await _userManager.AddLoginAsync(user, new UserLoginInfo(AuthenticatorStoreLoginProvider, refreshToken, user.UserName));
6060

6161
await _userManager.SetAuthenticationTokenAsync(user, AuthenticatorStoreLoginProvider, AuthenticatorKeyTokenName, jwtToken);
@@ -91,6 +91,8 @@ public async Task<IResponse> RefreshToken(RefreshTokenRequest request)
9191

9292
string refreshToken = CreateRefreshToken();
9393

94+
await _userManager.RemoveLoginAsync(user, AuthenticatorStoreLoginProvider, refreshToken);
95+
9496
await _userManager.AddLoginAsync(user, new UserLoginInfo(AuthenticatorStoreLoginProvider, refreshToken, user.UserName));
9597

9698
await _userManager.SetAuthenticationTokenAsync(user, AuthenticatorStoreLoginProvider, AuthenticatorKeyTokenName, jwtToken);

src/BlazorEcommerce.Infrastructure/Service/PaymentService.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,6 @@ public PaymentService(ICurrentUser currentUser, IOptions<StripeConfig> stripeCon
3030
}
3131

3232

33-
//public PaymentService(ICurrentUser currentUser)
34-
//{
35-
// StripeConfiguration.ApiKey = "sk_test_51KeFeXSJN18oZA5qDkeNlClNnS5A8xklAv5cvMUJHDRTZTQegBEO36BSpzpBp7gEHGgDUZKNlzmEvHDnhL1CmiRs00bfrcT737";
36-
37-
// _currentUser = currentUser;
38-
//}
39-
4033
public async Task<IResponse> CreateCheckoutSession(List<CartProductResponse> products)
4134
{
4235
var lineItems = new List<SessionLineItemOptions>();
1.12 KB
Loading
6.16 KB
Loading

src/Presentation/Client/wwwroot/index.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,20 @@
88
<base href="/" />
99
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
1010
<link href="css/app.css" rel="stylesheet" />
11+
<link rel="icon" type="image/png" href="favicon.png" />
1112
<link href="BlazorEcommerce.Client.styles.css" rel="stylesheet" />
1213
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" rel="stylesheet" />
1314
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
1415
</head>
1516

1617
<body>
17-
<div id="app">Loading...</div>
18+
<div id="app">
19+
<svg class="loading-progress">
20+
<circle r="40%" cx="50%" cy="50%" />
21+
<circle r="40%" cx="50%" cy="50%" />
22+
</svg>
23+
<div class="loading-progress-text"></div>
24+
</div>
1825

1926
<!--<div id="blazor-error-ui">
2027
An unhandled error has occurred.

src/Presentation/Server/appsettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Key": "kXpCDfN3E9+7pIoOO0d14BFoBeN8bcROxwdPrCCsfeY=",
77
"Issuer": "BlazorEcommerce.Api",
88
"Audience": "BlazorEcommerceUser",
9-
"DurationInMinutes": 15
9+
"DurationInMinutes": 60
1010
},
1111
"StripeSettings": {
1212
"Secret": "whsec_97ffacb1f4861c5c1d3b471259cea7c26ba8aaa6b103df80ccd9671e5794ce36",

0 commit comments

Comments
 (0)