Skip to content

Commit 53b1b1e

Browse files
committed
Fix google login
1 parent f766e10 commit 53b1b1e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/src/Naheulbook.Web/Controllers/GoogleAuthenticationController.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using AutoMapper;
22
using Microsoft.AspNetCore.Mvc;
3+
using Microsoft.Extensions.Options;
34
using Naheulbook.Core.Features.Users;
45
using Naheulbook.Shared.Clients.Google;
56
using Naheulbook.Shared.Utils;
@@ -13,7 +14,7 @@ namespace Naheulbook.Web.Controllers;
1314
[ApiController]
1415
[Route("api/v2/authentications/google")]
1516
public class GoogleAuthenticationController(
16-
GoogleOptions options,
17+
IOptions<GoogleOptions> options,
1718
IGoogleClient googleClient,
1819
IJwtService jwtService,
1920
IMapper mapper,
@@ -33,7 +34,7 @@ public ActionResult<AuthenticationInitResponse> PostInitOauthAuthentication()
3334
return new AuthenticationInitResponse
3435
{
3536
LoginToken = loginToken,
36-
AppKey = options.AppId,
37+
AppKey = options.Value.AppId,
3738
};
3839
}
3940

0 commit comments

Comments
 (0)