Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ The project uses the **FusionCache** library for server-side caching:

- **Output Cache Backend**: Powers the ASP.NET Core Output Cache implementation (Layer 4)
- **Data Caching**: Provides data caching via `IFusionCache` interface for caching arbitrary data (database query results, computed values, etc.) in addition to HTTP responses
- **Flexible Storage**: Supports multiple backends (in-memory, Redis, etc) for both response and data caching
- **Flexible Storage**: Supports multiple backends (in-memory, Redis, hybrid etc) for both response and data caching

---

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@
"parameters": {
"source": "name",
"toLower": true
}
},
"replaces": "boilerplate"
},
"nameToAppId": {
"type": "generated",
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
@inherits AppComponentBase

<section>
<BitStack Horizontal>
@if (isLoadingProviders)
{
@for (int i = 0; i < 4; i++)
{
<BitShimmer Height="60px" Width="60px" Shape="BitShimmerShape.Rectangle" Background="BitColor.SecondaryBackground" />
}
}
else
{
@if (supportedProviders.Contains("Keycloak"))
{
<ExternalSignInButton IsWaiting="IsWaiting" OnClick="WrapHandled(HandleKeycloak)" Title="@Localizer[AppStrings.KeycloakSignInButtonText]">
<KeycloakIcon />
</ExternalSignInButton>
}
@if (supportedProviders.Contains("Google"))
{
<ExternalSignInButton IsWaiting="IsWaiting" OnClick="WrapHandled(HandleGoogle)" Title="@Localizer[AppStrings.GoogleSignInButtonText]">
<GoogleIcon />
</ExternalSignInButton>
}
@if (supportedProviders.Contains("GitHub"))
{
<ExternalSignInButton IsWaiting="IsWaiting" OnClick="WrapHandled(HandleGitHub)" Title="@Localizer[AppStrings.GitHubSignInButtonText]">
<GitHubIcon />
</ExternalSignInButton>
}
@if (supportedProviders.Contains("Twitter"))
{
<ExternalSignInButton IsWaiting="IsWaiting" OnClick="WrapHandled(HandleTwitter)" Title="@Localizer[AppStrings.TwitterSignInButtonText]">
<TwitterIcon />
</ExternalSignInButton>
}
@if (supportedProviders.Contains("Apple"))
{
<ExternalSignInButton IsWaiting="IsWaiting" OnClick="WrapHandled(HandleApple)" Title="@Localizer[AppStrings.AppleSignInButtonText]">
<AppleIcon />
</ExternalSignInButton>
}
@if (supportedProviders.Contains("AzureAD"))
{
<ExternalSignInButton IsWaiting="IsWaiting" OnClick="WrapHandled(HandleAzureAD)" Title="@Localizer[AppStrings.AzureEntraSignInButtonText]">
<AzureEntraIcon />
</ExternalSignInButton>
}
@if (supportedProviders.Contains("Facebook"))
{
<ExternalSignInButton IsWaiting="IsWaiting" OnClick="WrapHandled(HandleFacebook)" Title="@Localizer[AppStrings.FacebookSignInButtonText]">
<FacebookIcon />
</ExternalSignInButton>
}
}
</BitStack>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace Boilerplate.Client.Core.Components.Pages.Identity.Components;

public partial class SocialRow
public partial class ExternalIdentityProviders
{
private bool isLoadingProviders = true;
private string[] supportedProviders = [];
Expand All @@ -18,7 +18,7 @@ protected override async Task OnInitAsync()
{
try
{
var providers = await IdentityController.GetSupportedSocialAuthSchemes(CurrentCancellationToken);
var providers = await IdentityController.GetSupportedExternalAuthSchemes(CurrentCancellationToken);
supportedProviders = providers;
}
finally
Expand All @@ -33,5 +33,5 @@ protected override async Task OnInitAsync()
private async Task HandleApple() => await OnClick.InvokeAsync("Apple");
private async Task HandleAzureAD() => await OnClick.InvokeAsync("AzureAD");
private async Task HandleFacebook() => await OnClick.InvokeAsync("Facebook");
private async Task HandleIdentityServerDemo() => await OnClick.InvokeAsync("IdentityServerDemo");
private async Task HandleKeycloak() => await OnClick.InvokeAsync("Keycloak");
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ section {
}

::deep {
.social-button {
.external-sign-in-button {
width: 60px;
height: 60px;
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
OnClick="OnClick"
Size="BitSize.Small"
IsEnabled="IsWaiting is false"
Class="social-button"
Class="external-sign-in-button"
Variant="BitVariant.Fill"
ButtonType="BitButtonType.Button"
Color="BitColor.SecondaryBackground">
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@inherits StaticComponent

<svg xmlns="http://www.w3.org/2000/svg" width="34" height="34" viewBox="0 0 24 24" fill="var(--bit-clr-fg-pri)">
<path fill="var(--bit-clr-fg-pri)" d="m18.742 1.182l-12.493.002C4.155 4.784 2.079 8.393 0 12.002c2.071 3.612 4.162 7.214 6.252 10.816l12.49-.004l3.089-5.404h2.158v-.002H24L23.996 6.59h-2.168zM8.327 4.792h2.081l1.04 1.8l-3.12 5.413l3.117 5.403l-1.035 1.81H8.327a2048 2048 0 0 0-4.168-7.204zm6.241 0l2.086.003q2.088 3.608 4.166 7.222l-4.167 7.2h-2.08c-.382-.562-1.038-1.808-1.038-1.808l3.123-5.405l-3.124-5.413z" />
</svg>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</BitText>
</BitStack>

<SocialRow IsWaiting="isWaiting" OnClick="SocialSignIn" />
<ExternalIdentityProviders IsWaiting="isWaiting" OnClick="ExternalSignIn" />

<BitSeparator Border="BitColorKind.Tertiary" Background="BitColorKind.Secondary" Class="lg-sep">@Localizer[AppStrings.Or]</BitSeparator>
<BitSeparator Border="BitColorKind.Secondary" Background="BitColorKind.Primary" Class="sm-sep">@Localizer[AppStrings.Or]</BitSeparator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private async Task DoSignIn()
isWaiting = true;
successfulSignIn = false;

await InvokeAsync(StateHasChanged); // Social sign-in callback will eventually call this method, so we need to update the UI immediately. See ClientAppMessages.SOCIAL_SIGN_IN_CALLBACK references.
await InvokeAsync(StateHasChanged); // External sign-in callback will eventually call this method, so we need to update the UI immediately. See ClientAppMessages.EXTERNAL_SIGN_IN_CALLBACK references.

try
{
Expand Down Expand Up @@ -202,16 +202,16 @@ private async Task DoSignIn()
finally
{
isWaiting = false;
await InvokeAsync(StateHasChanged); // Social sign-in callback will eventually call this method, so we need to update the UI immediately. See ClientAppMessages.SOCIAL_SIGN_IN_CALLBACK references.
await InvokeAsync(StateHasChanged); // External sign-in callback will eventually call this method, so we need to update the UI immediately. See ClientAppMessages.EXTERNAL_SIGN_IN_CALLBACK references.
}
}

private async Task SocialSignIn(string provider)
private async Task ExternalSignIn(string provider)
{
try
{
pubSubUnsubscribe?.Invoke();
pubSubUnsubscribe = PubSubService.Subscribe(ClientAppMessages.SOCIAL_SIGN_IN_CALLBACK, async (uriString) =>
pubSubUnsubscribe = PubSubService.Subscribe(ClientAppMessages.EXTERNAL_SIGN_IN_CALLBACK, async (uriString) =>
{
// Check out SignInModalService for more details
var uri = uriString!.ToString();
Expand Down Expand Up @@ -245,7 +245,7 @@ private async Task SocialSignIn(string provider)

var port = localHttpServer.EnsureStarted();

var redirectUrl = await identityController.GetSocialSignInUri(provider, GetReturnUrl(), port is -1 ? null : port, CurrentCancellationToken);
var redirectUrl = await identityController.GetExternalSignInUri(provider, GetReturnUrl(), port is -1 ? null : port, CurrentCancellationToken);

await externalNavigationService.NavigateTo(redirectUrl);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</BitText>
</BitStack>

<SocialRow IsWaiting="isWaiting" OnClick="SocialSignUp" />
<ExternalIdentityProviders IsWaiting="isWaiting" OnClick="ExternalSignUp" />

<BitSeparator Border="BitColorKind.Tertiary" Background="BitColorKind.Secondary" Class="lg-sep">@Localizer[AppStrings.Or]</BitSeparator>
<BitSeparator Border="BitColorKind.Secondary" Background="BitColorKind.Primary" Class="sm-sep">@Localizer[AppStrings.Or]</BitSeparator>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,19 @@ private void NavigateToConfirmPage()
NavigationManager.NavigateTo(confirmUrl, replace: true);
}

private async Task SocialSignUp(string provider)
private async Task ExternalSignUp(string provider)
{
try
{
pubSubUnsubscribe = PubSubService.Subscribe(ClientAppMessages.SOCIAL_SIGN_IN_CALLBACK, async (uriString) =>
pubSubUnsubscribe = PubSubService.Subscribe(ClientAppMessages.EXTERNAL_SIGN_IN_CALLBACK, async (uriString) =>
{
// Social sign-in creates a new user automatically, so we only need to navigate to the sign-in page to automatically sign-in the user by provided OTP.
// External sign-in creates a new user automatically, so we only need to navigate to the sign-in page to automatically sign-in the user by provided OTP.
NavigationManager.NavigateTo(uriString!.ToString()!, replace: true);
});

var port = localHttpServer.EnsureStarted();

var redirectUrl = await identityController.GetSocialSignInUri(provider, ReturnUrlQueryString, port is -1 ? null : port, CurrentCancellationToken);
var redirectUrl = await identityController.GetExternalSignInUri(provider, ReturnUrlQueryString, port is -1 ? null : port, CurrentCancellationToken);

await externalNavigationService.NavigateTo(redirectUrl);
}
Expand Down
Loading
Loading