Skip to content

Commit 9325b1d

Browse files
committed
Polish Flows
1 parent f9b4612 commit 9325b1d

113 files changed

Lines changed: 60729 additions & 76 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

UltimateAuth.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Solution>
22
<Folder Name="/Samples/">
33
<Project Path="samples/blazor-server/UltimateAuth.BlazorServer/UltimateAuth.BlazorServer.csproj" />
4+
<Project Path="samples/blazor-standalone-wasm/UltimateAuth.Sample.BlazorStandaloneWasm/UltimateAuth.Sample.BlazorStandaloneWasm.csproj" Id="27bd3c4d-65a9-4c70-a6c9-4178b1897730" />
45
</Folder>
56
<Folder Name="/Solution Items/">
67
<File Path="Readme.md" />

samples/blazor-server/UltimateAuth.BlazorServer/Components/Layout/MainLayout.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@inherits LayoutComponentBase
22

3+
<UAuthClientProvider />
4+
35
<MudThemeProvider />
46
<MudPopoverProvider />
57
<MudDialogProvider />

samples/blazor-server/UltimateAuth.BlazorServer/Components/Pages/Home.razor

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@page "/"
22
@page "/login"
33
@using CodeBeam.UltimateAuth.Client
4+
@using CodeBeam.UltimateAuth.Core.Abstractions
5+
@using CodeBeam.UltimateAuth.Core.Runtime
46
@using CodeBeam.UltimateAuth.Server.Abstractions
57
@using CodeBeam.UltimateAuth.Server.Cookies
68
@using CodeBeam.UltimateAuth.Server.Infrastructure
@@ -13,6 +15,7 @@
1315
@inject IHttpContextAccessor HttpContextAccessor
1416
@inject IUAuthClient UAuthClient
1517
@inject NavigationManager Nav
18+
@inject IUAuthProductInfoProvider ProductInfo
1619

1720

1821
<div class="uauth-page d-flex align-center justify-center">
@@ -35,5 +38,10 @@
3538
<MudStack Class="mud-width-full">
3639
<MudButton Variant="Variant.Filled" Color="Color.Info" OnClick="ProgrammaticLogin">Programmatic Login</MudButton>
3740
</MudStack>
41+
42+
<MudStack Spacing="0">
43+
<MudText><b>@ProductInfo.Get().ProductName</b> v @ProductInfo.Get().Version</MudText>
44+
<MudText>Client Profile: @ProductInfo.Get().ClientProfile.ToString()</MudText>
45+
</MudStack>
3846
</MudStack>
3947
</div>

samples/blazor-server/UltimateAuth.BlazorServer/Components/Pages/Home.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using CodeBeam.UltimateAuth.Client.Components;
1+
using CodeBeam.UltimateAuth.Client;
22
using CodeBeam.UltimateAuth.Core.Contracts;
33
using CodeBeam.UltimateAuth.Core.Domain;
44
using MudBlazor;

samples/blazor-server/UltimateAuth.BlazorServer/Components/_Imports.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
@using CodeBeam.UltimateAuth.Core.Abstractions
1313
@using CodeBeam.UltimateAuth.Core.Domain
14-
@using CodeBeam.UltimateAuth.Client.Components
14+
@using CodeBeam.UltimateAuth.Client
1515

1616
@using MudBlazor
1717
@using MudExtensions

samples/blazor-server/UltimateAuth.BlazorServer/Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
using CodeBeam.UltimateAuth.Client.Extensions;
2+
using CodeBeam.UltimateAuth.Core.Extensions;
3+
using CodeBeam.UltimateAuth.Core.Options;
24
using CodeBeam.UltimateAuth.Credentials.InMemory;
35
using CodeBeam.UltimateAuth.Security.Argon2;
46
using CodeBeam.UltimateAuth.Server.Extensions;
5-
using CodeBeam.UltimateAuth.Server.Options;
67
using CodeBeam.UltimateAuth.Sessions.InMemory;
78
using CodeBeam.UltimateAuth.Tokens.InMemory;
89
using Microsoft.AspNetCore.Components;
@@ -28,9 +29,9 @@
2829

2930
builder.Services.AddHttpContextAccessor();
3031

32+
builder.Services.AddUltimateAuth();
3133

3234
builder.Services.AddUltimateAuthServer(o => {
33-
o.ClientProfile = UAuthClientProfile.BlazorServer;
3435
o.Diagnostics.EnableRefreshHeaders = true;
3536
})
3637
.AddInMemoryCredentials()

samples/blazor-server/UltimateAuth.BlazorServer/UltimateAuth.BlazorServer.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7+
<Version>0.0.1-preview</Version>
78
</PropertyGroup>
89

910
<ItemGroup>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Router AppAssembly="@typeof(App).Assembly">
2+
<Found Context="routeData">
3+
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
4+
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
5+
</Found>
6+
<NotFound>
7+
<PageTitle>Not found</PageTitle>
8+
<LayoutView Layout="@typeof(MainLayout)">
9+
<p role="alert">Sorry, there's nothing at this address.</p>
10+
</LayoutView>
11+
</NotFound>
12+
</Router>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@inherits LayoutComponentBase
2+
<div class="page">
3+
<div class="sidebar">
4+
<NavMenu />
5+
</div>
6+
7+
<main>
8+
<div class="top-row px-4">
9+
<a href="https://learn.microsoft.com/aspnet/core/" target="_blank">About</a>
10+
</div>
11+
12+
<article class="content px-4">
13+
@Body
14+
</article>
15+
</main>
16+
</div>
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.page {
2+
position: relative;
3+
display: flex;
4+
flex-direction: column;
5+
}
6+
7+
main {
8+
flex: 1;
9+
}
10+
11+
.sidebar {
12+
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
13+
}
14+
15+
.top-row {
16+
background-color: #f7f7f7;
17+
border-bottom: 1px solid #d6d5d5;
18+
justify-content: flex-end;
19+
height: 3.5rem;
20+
display: flex;
21+
align-items: center;
22+
}
23+
24+
.top-row ::deep a, .top-row ::deep .btn-link {
25+
white-space: nowrap;
26+
margin-left: 1.5rem;
27+
text-decoration: none;
28+
}
29+
30+
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
31+
text-decoration: underline;
32+
}
33+
34+
.top-row ::deep a:first-child {
35+
overflow: hidden;
36+
text-overflow: ellipsis;
37+
}
38+
39+
@media (max-width: 640.98px) {
40+
.top-row {
41+
justify-content: space-between;
42+
}
43+
44+
.top-row ::deep a, .top-row ::deep .btn-link {
45+
margin-left: 0;
46+
}
47+
}
48+
49+
@media (min-width: 641px) {
50+
.page {
51+
flex-direction: row;
52+
}
53+
54+
.sidebar {
55+
width: 250px;
56+
height: 100vh;
57+
position: sticky;
58+
top: 0;
59+
}
60+
61+
.top-row {
62+
position: sticky;
63+
top: 0;
64+
z-index: 1;
65+
}
66+
67+
.top-row.auth ::deep a:first-child {
68+
flex: 1;
69+
text-align: right;
70+
width: 0;
71+
}
72+
73+
.top-row, article {
74+
padding-left: 2rem !important;
75+
padding-right: 1.5rem !important;
76+
}
77+
}

0 commit comments

Comments
 (0)