diff --git a/.github/workflows/bit.full.ci.yml b/.github/workflows/bit.full.ci.yml
index 9bc101a737..a02e620383 100644
--- a/.github/workflows/bit.full.ci.yml
+++ b/.github/workflows/bit.full.ci.yml
@@ -32,7 +32,7 @@ jobs:
- name: Release build todo sample + sqlite database
run: |
dotnet workload install maui-tizen maui-android wasm-tools wasm-experimental
- dotnet new bit-bp --name TodoBPSqlite --database sqlite --sample todo --pipeline other
+ dotnet new bit-bp --name TodoBPSqlite --database sqlite --sample todo --pipeline none
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT "platform-tools"
cd TodoBPSqlite/src/TodoBPSqlite.Server/
dotnet tool restore
@@ -42,9 +42,9 @@ jobs:
dotnet build TodoBPSqlite/TodoBPSqlite.sln -c Release -p:RunAOTCompilation=false
dotnet build TodoBPSqlite/src/Client/TodoBPSqlite.Client.Web/TodoBPSqlite.Client.Web.csproj -c Release -p:BlazorWebAssemblyStandalone=true
- - name: Release build empty sample + offline db + Win exe
+ - name: Release build empty sample + offline db + Win exe + No reCaptcha
run: |
- dotnet new bit-bp --name EmptyBP --database other --sample none --pipeline azure --offlineDb --windows
+ dotnet new bit-bp --name EmptyBP --database other --sample none --pipeline azure --offlineDb --windows --captcha none
dotnet build EmptyBP/EmptyBP.sln -c Release -p:RunAOTCompilation=false
- name: Release build empty sample without api
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json b/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json
index 01c9c79a7f..b11a54a332 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/.template.config/template.json
@@ -51,6 +51,12 @@
"format": "yyyy-MM-dd"
}
},
+ "api": {
+ "displayName": "Add API to Server project?",
+ "type": "parameter",
+ "datatype": "bool",
+ "defaultValue": "true"
+ },
"database": {
"displayName": "Backend database",
"type": "parameter",
@@ -71,6 +77,22 @@
}
]
},
+ "captcha": {
+ "displayName": "Captcha",
+ "type": "parameter",
+ "datatype": "choice",
+ "defaultValue": "reCaptcha",
+ "choices": [
+ {
+ "choice": "reCaptcha",
+ "description": "Google reCaptcha"
+ },
+ {
+ "choice": "None",
+ "description": "None"
+ }
+ ]
+ },
"pipeline": {
"displayName": "CI-CD pipeline",
"type": "parameter",
@@ -86,8 +108,8 @@
"description": "Azure DevOps pipelines"
},
{
- "choice": "Other",
- "description": "Other"
+ "choice": "None",
+ "description": "None"
}
]
},
@@ -123,12 +145,6 @@
"datatype": "bool",
"defaultValue": "false"
},
- "api": {
- "displayName": "Add API to Server project?",
- "type": "parameter",
- "datatype": "bool",
- "defaultValue": "true"
- },
"appInsights": {
"displayName": "Add Azure application insights to project?",
"type": "parameter",
@@ -277,9 +293,23 @@
"src/Boilerplate.Server/Services/AppSecureJwtDataFormat.cs",
"src/Boilerplate.Server/wwwroot/swagger/**",
"src/Boilerplate.Server/AppSettings.cs",
+ "src/Boilerplate.Server/Services/ServerJsonContext.cs",
"src/Boilerplate.Server/IdentityCertificate.pfx"
]
},
+ {
+ "condition": "(api != true || captcha != reCaptcha)",
+ "exclude": [
+ "src/Boilerplate.Server/Services/GoogleRecaptchaHttpClient.cs",
+ "src/Boilerplate.Server/Services/GoogleRecaptchaVerificationResponse.cs"
+ ]
+ },
+ {
+ "condition": "(captcha != reCaptcha)",
+ "exclude": [
+ "src/Boilerplate.Client.Core/Components/Pages/Identity/GoogleRecaptcha.razor"
+ ]
+ },
{
"condition": "(appInsights != true)",
"exclude": [
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/AppSettings.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/AppSettings.cs
index 3499a2379c..e23d70deae 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/AppSettings.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/AppSettings.cs
@@ -1,4 +1,5 @@
-namespace Boilerplate.Server;
+//+:cnd:noEmit
+namespace Boilerplate.Server;
public class AppSettings
{
@@ -10,7 +11,9 @@ public class AppSettings
public string UserProfileImagesDir { get; set; } = default!;
+ //#if (captcha == "reCaptcha")
public string GoogleRecaptchaSecretKey { get; set; } = default!;
+ //#endif
}
public class HealthCheckSettings
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor
index 2c84b0a954..00450f68cc 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Components/App.razor
@@ -11,10 +11,17 @@
+
+
+ @*#if (captcha == "reCaptcha")*@
+
+
+ @*#endif*@
+
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Identity/IdentityController.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Identity/IdentityController.cs
index 1e9a848689..7560b730fc 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Identity/IdentityController.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Controllers/Identity/IdentityController.cs
@@ -1,4 +1,4 @@
-//-:cnd:noEmit
+//+:cnd:noEmit
using System.Text;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web;
@@ -28,11 +28,11 @@ public partial class IdentityController : AppControllerBase, IIdentityController
[AutoInject] private HtmlRenderer htmlRenderer = default!;
- [AutoInject] private IStringLocalizer identityLocalizer = default!;
-
[AutoInject] private IOptionsMonitor bearerTokenOptions = default!;
+ //#if (captcha == "reCaptcha")
[AutoInject] private GoogleRecaptchaHttpClient googleRecaptchaHttpClient = default!;
+ //#endif
///
/// By leveraging summary tags in your controller's actions and DTO properties you can make your codes much easier to maintain.
@@ -41,8 +41,10 @@ public partial class IdentityController : AppControllerBase, IIdentityController
[HttpPost]
public async Task SignUp(SignUpRequestDto signUpRequest, CancellationToken cancellationToken)
{
- if (await googleRecaptchaHttpClient.Verify(signUpRequest.GoogleRecaptchaResponse) is false)
+ //#if (captcha == "reCaptcha")
+ if (await googleRecaptchaHttpClient.Verify(signUpRequest.GoogleRecaptchaResponse, cancellationToken) is false)
throw new BadRequestException(Localizer[nameof(AppStrings.InvalidGoogleRecaptchaResponse)]);
+ //#endif
var existingUser = await userManager.FindByNameAsync(signUpRequest.Email!);
@@ -145,11 +147,8 @@ public async Task ConfirmEmail(ConfirmEmailRequestDto body)
}
[HttpPost, ProducesResponseType(statusCode: 200)]
- public async Task SignIn(SignInRequestDto signInRequest)
+ public async Task SignIn(SignInRequestDto signInRequest, CancellationToken cancellationToken)
{
- if (await googleRecaptchaHttpClient.Verify(signInRequest.GoogleRecaptchaResponse) is false)
- throw new BadRequestException(Localizer[nameof(AppStrings.InvalidGoogleRecaptchaResponse)]);
-
signInManager.AuthenticationScheme = IdentityConstants.BearerScheme;
var result = await signInManager.PasswordSignInAsync(signInRequest.UserName!, signInRequest.Password!, isPersistent: false, lockoutOnFailure: true);
@@ -196,9 +195,6 @@ await signInManager.ValidateSecurityStampAsync(refreshTicket.Principal) is not U
[HttpPost]
public async Task SendResetPasswordEmail(SendResetPasswordEmailRequestDto sendResetPasswordEmailRequest, CancellationToken cancellationToken)
{
- if (await googleRecaptchaHttpClient.Verify(sendResetPasswordEmailRequest.GoogleRecaptchaResponse) is false)
- throw new BadRequestException(Localizer.GetString(nameof(AppStrings.InvalidGoogleRecaptchaResponse)));
-
var user = await userManager.FindByEmailAsync(sendResetPasswordEmailRequest.Email!)
?? throw new BadRequestException(Localizer.GetString(nameof(AppStrings.UserNameNotFound), sendResetPasswordEmailRequest.Email!));
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.Services.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.Services.cs
index 27132672fd..59a5c945a9 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.Services.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Program.Services.cs
@@ -144,10 +144,12 @@ private static void ConfigureServices(this WebApplicationBuilder builder)
AddBlazor(builder);
+ //#if (api == true && captcha == "reCaptcha")
services.AddHttpClient(c =>
{
c.BaseAddress = new Uri("https://www.google.com/recaptcha/");
});
+ //#endif
}
private static void AddBlazor(WebApplicationBuilder builder)
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/GoogleRecaptchaHttpClient.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/GoogleRecaptchaHttpClient.cs
index 6964e542e5..db3a63d6e8 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/GoogleRecaptchaHttpClient.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/GoogleRecaptchaHttpClient.cs
@@ -6,17 +6,17 @@ public partial class GoogleRecaptchaHttpClient
[AutoInject] protected HttpClient httpClient = default!;
- public async ValueTask Verify(string? googleRecaptchaResponse)
+ public async ValueTask Verify(string? googleRecaptchaResponse, CancellationToken cancellationToken)
{
if (string.IsNullOrWhiteSpace(googleRecaptchaResponse)) return false;
var url = $"api/siteverify?secret={AppSettings.GoogleRecaptchaSecretKey}&response={googleRecaptchaResponse}";
- var response = await httpClient.PostAsync(url, null);
+ var response = await httpClient.PostAsync(url, null, cancellationToken);
response.EnsureSuccessStatusCode();
- var result = await response.Content.ReadFromJsonAsync(ServerJsonContext.Default.GoogleRecaptchaVerificationResponse);
+ var result = await response.Content.ReadFromJsonAsync(ServerJsonContext.Default.GoogleRecaptchaVerificationResponse, cancellationToken: cancellationToken);
- return result?.Success ?? false;
+ return result?.Success is true;
}
}
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/ServerJsonContext.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/ServerJsonContext.cs
index 8358a44761..36ee1687f9 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/ServerJsonContext.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/Services/ServerJsonContext.cs
@@ -1,11 +1,14 @@
-namespace Boilerplate.Server.Services;
+//+:cnd:noEmit
+namespace Boilerplate.Server.Services;
///
/// https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/
///
[JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)]
[JsonSerializable(typeof(Dictionary))]
+//#if (captcha == "reCaptcha")
[JsonSerializable(typeof(GoogleRecaptchaVerificationResponse))]
+//#endif
public partial class ServerJsonContext : JsonSerializerContext
{
}
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/appsettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/appsettings.json
index b3d42f4119..95df4752e5 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/appsettings.json
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Server/appsettings.json
@@ -35,7 +35,9 @@
"EnableHealthChecks": false
},
"UserProfileImagesDir": "Attachments/Profiles/",
+ //#if (captcha == "reCaptcha")
"GoogleRecaptchaSecretKey": "6LdMKr4pAAAAANvngWNam_nlHzEDJ2t6SfV6L_DS"
+ //#endif
},
//#endif
"AllowedHosts": "*"
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/ResetPasswordRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/ResetPasswordRequestDto.cs
index 88b9b98510..98e4033edb 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/ResetPasswordRequestDto.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/ResetPasswordRequestDto.cs
@@ -1,4 +1,4 @@
-
+//+:cnd:noEmit
namespace Boilerplate.Shared.Dtos.Identity;
[DtoResourceType(typeof(AppStrings))]
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs
index a2c1e0afc6..840503f700 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailConfirmLinkRequestDto.cs
@@ -1,4 +1,4 @@
-
+//+:cnd:noEmit
namespace Boilerplate.Shared.Dtos.Identity;
[DtoResourceType(typeof(AppStrings))]
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs
index d3d8afc7c4..1b9b898810 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SendEmailForgotPasswordLinkRequestDto.cs
@@ -1,4 +1,4 @@
-
+//+:cnd:noEmit
namespace Boilerplate.Shared.Dtos.Identity;
[DtoResourceType(typeof(AppStrings))]
@@ -8,6 +8,4 @@ public class SendResetPasswordEmailRequestDto
[EmailAddress(ErrorMessage = nameof(AppStrings.EmailAddressAttribute_ValidationError))]
[Display(Name = nameof(AppStrings.Email))]
public string? Email { get; set; }
-
- public string? GoogleRecaptchaResponse { get; set; }
}
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignInRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignInRequestDto.cs
index 0bcabf9a7b..8b89566b5b 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignInRequestDto.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignInRequestDto.cs
@@ -1,4 +1,4 @@
-
+//+:cnd:noEmit
namespace Boilerplate.Shared.Dtos.Identity;
[DtoResourceType(typeof(AppStrings))]
@@ -18,6 +18,4 @@ public class SignInRequestDto
[JsonIgnore]
[Display(Name = nameof(AppStrings.RememberMe))]
public bool RememberMe { get; set; } = true;
-
- public string? GoogleRecaptchaResponse { get; set; }
}
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignUpRequestDto.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignUpRequestDto.cs
index 8c3b820dc6..0d4ecc921e 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignUpRequestDto.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Dtos/Identity/SignUpRequestDto.cs
@@ -1,4 +1,5 @@
-namespace Boilerplate.Shared.Dtos.Identity;
+//+:cnd:noEmit
+namespace Boilerplate.Shared.Dtos.Identity;
[DtoResourceType(typeof(AppStrings))]
public class SignUpRequestDto
@@ -22,5 +23,7 @@ public class SignUpRequestDto
[Display(Name = nameof(AppStrings.TermsAccepted))]
public bool TermsAccepted { get; set; }
+ //#if (captcha == "reCaptcha")
public string? GoogleRecaptchaResponse { get; set; }
+ //#endif
}
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.Designer.cs b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.Designer.cs
index 139c8c2516..0683084447 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.Designer.cs
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.Designer.cs
@@ -1078,15 +1078,6 @@ public static string ResetPasswordTitle {
}
}
- ///
- /// Looks up a localized string similar to Reset reCAPTCHA.
- ///
- public static string ResetRecaptcha {
- get {
- return ResourceManager.GetString("ResetRecaptcha", resourceCulture);
- }
- }
-
///
/// Looks up a localized string similar to Resource not found.
///
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fa.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fa.resx
index 80d414d956..494a012057 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fa.resx
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fa.resx
@@ -583,7 +583,4 @@
شما باید چالش گوگل ریکپچا را به سرانجام برسانید.
-
- بازنشانی ریکپجا
-
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fr.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fr.resx
index 9b366a04c4..15a0e6d4b6 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fr.resx
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.fr.resx
@@ -582,7 +582,4 @@
Vous devez réussir le défi Google reCAPTCHA.
-
- Réinitialiser reCAPTCHA
-
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.resx b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.resx
index bd6f718435..075bf62f88 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.resx
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Boilerplate.Shared/Resources/AppStrings.resx
@@ -585,14 +585,13 @@ Please confirm your email by clicking on the link.
Dashboard
+
Invalid Google reCAPTCHA response.
You need to pass the Google reCAPTCHA challenge.
-
- Reset reCAPTCHA
-
+
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ForgotPasswordPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ForgotPasswordPage.razor
index 005b0db9a2..cf3e664031 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ForgotPasswordPage.razor
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ForgotPasswordPage.razor
@@ -1,4 +1,5 @@
-@page "/forgot-password"
+@*+:cnd:noEmit*@
+@page "/forgot-password"
@inherits AppComponentBase
@Localizer[nameof(AppStrings.ForgetPasswordTitle)]
@@ -30,10 +31,6 @@
-
-
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ResetPasswordPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ResetPasswordPage.razor
index f7d7dd9089..9cced282d9 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ResetPasswordPage.razor
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/ResetPasswordPage.razor
@@ -20,6 +20,7 @@
{
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/SignInPage.razor b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/SignInPage.razor
index 0d612567cd..234ce52c6a 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/SignInPage.razor
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/Identity/SignInPage.razor
@@ -1,4 +1,5 @@
-@page "/sign-in"
+@*+:cnd:noEmit*@
+@page "/sign-in"
@inherits AppComponentBase
@Localizer[nameof(AppStrings.SignInTitle)]
@@ -40,10 +41,6 @@
-
-
-
-
@Localizer[nameof(AppStrings.SingUpTitle)]
@@ -29,12 +30,14 @@
@Localizer[nameof(AppStrings.NotReceivedConfirmationEmailMessage)]
+
@Localizer[nameof(AppStrings.CheckSpamMailMessage)]
- @Localizer[nameof(AppStrings.Or)] -
+
+ @*#if (captcha == "reCaptcha")*@
+ @*#endif*@
GoogleRecaptchaGetResponse(this IJSRuntime jsRuntime)
{
return jsRuntime.InvokeAsync("grecaptcha.getResponse");
@@ -16,4 +18,5 @@ public static ValueTask GoogleRecaptchaReset(this IJSRuntime jsRuntime)
{
return jsRuntime.InvokeAsync("grecaptcha.reset");
}
+ //#endif
}
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json
index b3492f59f2..ab140adea9 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/appsettings.json
@@ -25,6 +25,8 @@
"FilesUrl": null,
"AutoReload": true
},
+ //#if (captcha == "reCaptcha")
"GoogleRecaptchaSiteKey": "6LdMKr4pAAAAAKMyuEPn3IHNf04EtULXA8uTIVRw",
+ //#endif
"$schema": "https://json.schemastore.org/appsettings.json"
}
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html
index 7cec135190..d85869b967 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Maui/wwwroot/index.html
@@ -6,6 +6,9 @@
+
+
+
diff --git a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html
index 859413afa3..a17d553676 100644
--- a/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html
+++ b/src/Templates/Boilerplate/Bit.Boilerplate/src/Client/Boilerplate.Client.Web/wwwroot/index.html
@@ -6,6 +6,10 @@
+
+
+
+
diff --git a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor
index 81c615946e..0936d5bc8a 100644
--- a/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor
+++ b/src/Websites/Platform/src/Bit.Websites.Platform.Client/Pages/Templates/Templates04CreateProjectPage.razor
@@ -26,12 +26,13 @@ dotnet new bit-bp
Note: bit project templates accept the following parameters:
- --name (default is current folder name)
+ - --api defaults to true: '--api true' adds support for aspnetcore identity, webapi, odata, ef core and fluent email.
- --database default to SqlServer among following options: SqlServer Sqlite, Other
- - --pipeline default to GitHub among the following options: GitHub, Azure (AzureDevOps pipelines), Other
+ - --captcha default to reCaptcha among following options: reCaptcha None
+ - --pipeline default to GitHub among the following options: GitHub, Azure (AzureDevOps pipelines), None
- --sample default to None among the following options: Admin, Todo, None
- --offlineDb defaults to false: '--offlineDb true' adds sqlite database support to the client mobile, web and desktop apps
- --windows default to false: '--windows true' adds support for exe output for windows 7+
- - --api defaults to true: '--api true' adds support for aspnetcore identity, webapi, odata, ef core and fluent email.
- --appInsights defaults to false: '--appInsights true' adds support for Azure application insights in all clients (Android, iOS, Windows, macOS, Web)