![]() |
VOOZH | about |
dotnet add package Rystem.Authentication.Social.Blazor --version 10.0.8
NuGet\Install-Package Rystem.Authentication.Social.Blazor -Version 10.0.8
<PackageReference Include="Rystem.Authentication.Social.Blazor" Version="10.0.8" />
<PackageVersion Include="Rystem.Authentication.Social.Blazor" Version="10.0.8" />Directory.Packages.props
<PackageReference Include="Rystem.Authentication.Social.Blazor" />Project file
paket add Rystem.Authentication.Social.Blazor --version 10.0.8
#r "nuget: Rystem.Authentication.Social.Blazor, 10.0.8"
#:package Rystem.Authentication.Social.Blazor@10.0.8
#addin nuget:?package=Rystem.Authentication.Social.Blazor&version=10.0.8Install as a Cake Addin
#tool nuget:?package=Rystem.Authentication.Social.Blazor&version=10.0.8Install as a Cake Tool
Rystem.Authentication.Social.Blazor is the Blazor-side companion to Rystem.Authentication.Social.
It handles browser-local state, callback processing, token retrieval, user loading, and a small amount of localization glue. It does not replace your server package and it does not register arbitrary social-login providers by itself.
dotnet add package Rystem.Authentication.Social.Blazor
The Blazor package is centered around:
AddSocialLoginUI(...)UseSocialLoginAuthorization()SocialLoginManagerSocialAuthentication and SocialAuthenticationRouterThe normal flow is:
SocialAuthentication or SocialAuthenticationRouterSocialLoginManager read stored state, process the OAuth callback, exchange codes with the server, and load the authenticated userThe real setup API is:
builder.Services.AddSocialLoginUI(settings =>
{
settings.ApiUrl = "https://localhost:7017";
settings.Google.ClientId = builder.Configuration["SocialLogin:Google:ClientId"];
settings.Microsoft.ClientId = builder.Configuration["SocialLogin:Microsoft:ClientId"];
settings.Platform.RedirectPath = "/account/login";
});
AddSocialLoginUI(...) currently registers:
SocialLoginAppSettingsSocialLoginLocalStorageServiceHttpClient for SocialLoginManagerSocialLoginManagerLocalizationMiddlewareIAuthorizationHeaderProvider via SocialLoginAuthorizationHeaderProviderapp.UseSocialLoginAuthorization();
In the current implementation this only adds the localization middleware. It does not set up authentication middleware or map social-login endpoints.
The package needs its JS asset loaded explicitly. The sample app does this in src/Authentication/Tests/RystemAuthentication.Social.TestBlazorApp/Components/App.razor:
<script src="_content/Rystem.Authentication.Social.Blazor/socialauthentications.js"></script>
Without that script, local storage helpers and language cookie helpers will not work.
SocialLoginAppSettings currently exposes:
ApiUrlGoogleFacebookMicrosoftPlatformLoginModeImportant runtime note: the built-in <SocialLogin> component currently renders only Microsoft and Google buttons, even though SocialLoginAppSettings also exposes Facebook.
Another important detail: the current runtime flow is effectively driven by Platform.LoginMode; the top-level LoginMode property exists on the settings type but is not the part the runtime actively reads during callback handling.
Platform.RedirectPath is interpreted like this by SocialLoginManager.GetFullRedirectUri():
:////account/login under the current base URI when omittedPlatform.LoginMode exists, but popup support is not meaningfully implemented in this Blazor package. In practice the flow is redirect-oriented.
SocialAuthentication<TUser>SocialAuthentication<TUser> wraps authenticated content.
<SocialLogin> plus optional LoginPageSocialUser and LogoutCallbackILocalizedSocialUser, it persists the language locallySample usage from src/Authentication/Tests/RystemAuthentication.Social.TestBlazorApp/Components/Routes.razor:
<SocialAuthenticationRouter AppAssembly="typeof(Program).Assembly"
DefaultLayout="typeof(Layout.MainLayout)"
TUser="SocialUser"
SetUser="SetUserAsync">
<LoginPage>
<h1>Your customization here.</h1>
</LoginPage>
</SocialAuthenticationRouter>
SocialAuthenticationRouter<TUser>This is a wrapper around Blazor's router that nests every route inside SocialAuthentication<TUser>.
Use it when you want route-level protection with the package's built-in login shell.
SocialLoginSocialLogin renders the built-in login buttons above optional child content.
Current built-in button support:
SocialLogoutSocialLogout renders a logout button and participates in the package's local state cleanup flow.
SocialLoginManagerSocialLoginManager is the imperative entry point.
Key methods:
FetchTokenAsync()MeAsync<TUser>()LogoutAsync()GetFullRedirectUri()FetchTokenAsync() currently does this:
/api/Authentication/Social/Token?provider=DotNet&code=<refreshToken>code and state from the current URIThe callback exchange includes:
Origin based on the current base URIredirectPath from the current page pathcode_verifierMeAsync<TUser>() calls /api/Authentication/Social/User with the bearer token. If that call returns 401, it attempts a DotNet refresh first and retries.
When user loading succeeds, SocialLoginAuthorizationHeaderProvider is updated with the current bearer token so other consumers can read it.
If the loaded user implements ILocalizedSocialUser, the package:
lang cookieCultureInfo.CurrentCulture and CultureInfo.CurrentUICultureUseSocialLoginAuthorization() then applies that cookie through LocalizationMiddleware on later requests.
It expects a backend that exposes:
/api/Authentication/Social/Token/api/Authentication/Social/UserWithout Rystem.Authentication.Social on the server side, the Blazor flow cannot complete.
The settings type exposes Facebook, but the built-in <SocialLogin> component currently renders only Microsoft and Google buttons.
The current callback implementation looks for microsoft_code_verifier in local storage when building the token exchange request.
UseSocialLoginAuthorization() is only localization middlewareDespite its name, it does not configure auth handlers or attach bearer tokens to your API clients by itself.
If you want repository/API client calls to reuse the stored social token, you need a separate integration layer. The sample app does that with AddDefaultSocialLoginAuthorizationInterceptorForApiHttpClient() from RepositoryFramework.Api.Client.Authentication.BlazorServer in src/Authentication/Tests/RystemAuthentication.Social.TestBlazorApp/Program.cs.
SocialLoginManager.LogoutAsync() clears token storage and the in-memory authorization header, while SocialAuthentication also clears state and optionally forces a page reload.
src/Authentication/Tests/RystemAuthentication.Social.TestBlazorApp/Program.cssrc/Authentication/Tests/RystemAuthentication.Social.TestBlazorApp/Components/App.razorsrc/Authentication/Tests/RystemAuthentication.Social.TestBlazorApp/Components/Routes.razorsrc/Authentication/Rystem.Authentication.Social.Blazor/Services/SocialLoginManager.cssrc/Authentication/Rystem.Authentication.Social.Blazor/Components/SocialAuthentication.razorsrc/Authentication/Rystem.Authentication.Social.Blazor/Components/SocialAuthenticationRouter.razorUse this package when you want a Blazor UI and local-session wrapper around the server-side social-login endpoints, not when you need a fully standalone auth system.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on Rystem.Authentication.Social.Blazor:
| Package | Downloads |
|---|---|
|
Rystem.Api.Client.Authentication.BlazorServer
Rystem.Api helps you to integrate Api Server and Automated Client for Aspect-Oriented programming. |
|
|
Rystem.RepositoryFramework.Api.Client.Authentication.BlazorServer
Rystem.RepositoryFramework allows you to use correctly concepts like repository pattern, CQRS and DDD. You have interfaces for your domains, auto-generated api, auto-generated HttpClient to simplify connection "api to front-end", a functionality for auto-population in memory of your models, a functionality to simulate exceptions and waiting time from external sources to improve your implementation/business test and load test. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.8 | 5,569 | 5/13/2026 |
| 10.0.7 | 192 | 3/26/2026 |
| 10.0.6 | 433,709 | 3/3/2026 |
| 10.0.5 | 205 | 2/22/2026 |
| 10.0.4 | 216 | 2/9/2026 |
| 10.0.3 | 147,967 | 1/28/2026 |
| 10.0.1 | 209,137 | 11/12/2025 |
| 9.1.3 | 353 | 9/2/2025 |
| 9.1.2 | 764,555 | 5/29/2025 |
| 9.1.1 | 97,883 | 5/2/2025 |
| 9.0.32 | 186,731 | 4/15/2025 |
| 9.0.31 | 5,878 | 4/2/2025 |
| 9.0.30 | 88,868 | 3/26/2025 |
| 9.0.29 | 9,040 | 3/18/2025 |
| 9.0.28 | 263 | 3/17/2025 |
| 9.0.27 | 257 | 3/16/2025 |
| 9.0.26 | 309 | 3/13/2025 |
| 9.0.25 | 52,149 | 3/9/2025 |
| 9.0.21 | 358 | 3/6/2025 |
| 9.0.20 | 19,637 | 3/6/2025 |