From c467551562c1ac5f12dd52e24adc04505c0abb4a Mon Sep 17 00:00:00 2001 From: martincostello Date: Tue, 13 Feb 2024 21:15:47 +0000 Subject: [PATCH 01/12] Update to ASP.NET Core 9 preview 1 Update to preview 1 of ASP.NET Core 9. --- .vscode/launch.json | 2 +- .vsconfig | 2 +- build.ps1 | 4 ---- global.json | 2 +- src/SignInWithApple/SignInWithApple.csproj | 9 +++++---- tests/SignInWithApple.Tests/SignInWithApple.Tests.csproj | 2 +- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 59880394..b9e03771 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "coreclr", "request": "launch", "preLaunchTask": "build", - "program": "${workspaceFolder}/src/SignInWithApple/bin/Debug/net8.0/MartinCostello.SignInWithApple.dll", + "program": "${workspaceFolder}/src/SignInWithApple/bin/Debug/net9.0/MartinCostello.SignInWithApple.dll", "args": [], "cwd": "${workspaceFolder}/src/SignInWithApple", "stopAtEntry": false, diff --git a/.vsconfig b/.vsconfig index 2e042699..9ca944ce 100644 --- a/.vsconfig +++ b/.vsconfig @@ -3,7 +3,7 @@ "components": [ "Microsoft.VisualStudio.Component.CoreEditor", "Microsoft.VisualStudio.Workload.CoreEditor", - "Microsoft.NetCore.Component.Runtime.8.0", + "Microsoft.NetCore.Component.Runtime.9.0", "Microsoft.NetCore.Component.SDK", "Microsoft.VisualStudio.Component.Roslyn.Compiler", "Microsoft.VisualStudio.Component.Roslyn.LanguageServices", diff --git a/build.ps1 b/build.ps1 index 3fa1d3be..ac89ef46 100755 --- a/build.ps1 +++ b/build.ps1 @@ -4,10 +4,6 @@ param( [Parameter(Mandatory = $false)][string] $Runtime = "" ) -if ($null -eq $env:MSBUILDTERMINALLOGGER) { - $env:MSBUILDTERMINALLOGGER = "auto" -} - $solutionPath = $PSScriptRoot $sdkFile = Join-Path $solutionPath "global.json" diff --git a/global.json b/global.json index 9f950662..7c03ae06 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.303", + "version": "9.0.100-preview.1.24101.2", "allowPrerelease": false } } diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index dfe3531a..ffab8cd8 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -5,21 +5,22 @@ SHA256 noble true - true + + false en-US Exe true true MartinCostello.SignInWithApple - net8.0 + net9.0 MartinCostello.SignInWithApple - 3.0.0 + 4.0.0 - + diff --git a/tests/SignInWithApple.Tests/SignInWithApple.Tests.csproj b/tests/SignInWithApple.Tests/SignInWithApple.Tests.csproj index fc412cbe..e26b1037 100644 --- a/tests/SignInWithApple.Tests/SignInWithApple.Tests.csproj +++ b/tests/SignInWithApple.Tests/SignInWithApple.Tests.csproj @@ -7,7 +7,7 @@ true MartinCostello.SignInWithApple $(Description) - net8.0 + net9.0 From 5027813b3807737f04583367818fb6a95f3f37d2 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Tue, 13 Feb 2024 21:29:30 +0000 Subject: [PATCH 02/12] Update comment Add link to issue. --- src/SignInWithApple/SignInWithApple.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index ffab8cd8..73b03159 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -5,7 +5,7 @@ SHA256 noble true - + false en-US Exe From b7a17d905faa994700cbc1ac74c1c015843807dc Mon Sep 17 00:00:00 2001 From: martincostello Date: Wed, 6 Mar 2024 09:09:30 +0000 Subject: [PATCH 03/12] Bump AspNet.Security.OAuth.Apple Update to .NET 9 version of AspNet.Security.OAuth.Apple. --- NuGet.config | 4 ++++ src/SignInWithApple/SignInWithApple.csproj | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 38ac8e75..d7795666 100644 --- a/NuGet.config +++ b/NuGet.config @@ -2,9 +2,13 @@ + + + + diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index 73b03159..9d2e1145 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -17,7 +17,7 @@ 4.0.0 - + From 5a95d1192ef8b411ac93bf10ca8e4559303b17ca Mon Sep 17 00:00:00 2001 From: costellobot <102549341+costellobot@users.noreply.github.com> Date: Tue, 12 Mar 2024 20:58:38 +0000 Subject: [PATCH 04/12] Update .NET SDK to 9.0.100-preview.2.24157.14 (#433) * Update .NET SDK Update .NET SDK to version 9.0.100-preview.2.24157.14. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> * Bump Microsoft.AspNetCore.AzureAppServices.HostingStartup from 9.0.0-preview.1.24081.5 to 9.0.0-preview.2.24128.4 Bumps Microsoft.AspNetCore.AzureAppServices.HostingStartup from 9.0.0-preview.1.24081.5 to 9.0.0-preview.2.24128.4. --- updated-dependencies: - dependency-name: Microsoft.AspNetCore.AzureAppServices.HostingStartup dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --------- Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --- global.json | 2 +- src/SignInWithApple/SignInWithApple.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/global.json b/global.json index 7c03ae06..89d7b15d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100-preview.1.24101.2", + "version": "9.0.100-preview.2.24157.14", "allowPrerelease": false } } diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index 9d2e1145..23f24202 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -20,7 +20,7 @@ - + From 3954445a4298535637d65b72893e0c111e1be041 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Wed, 13 Mar 2024 01:25:27 +0000 Subject: [PATCH 05/12] Bump AspNet.Security.OAuth.Apple Bump AspNet.Security.OAuth.Apple for preview 2. --- src/SignInWithApple/SignInWithApple.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index 23f24202..ea4f4d50 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -17,7 +17,7 @@ 4.0.0 - + From 54a132a563e03b06a952a30984161d79e79cb9c2 Mon Sep 17 00:00:00 2001 From: costellobot <102549341+costellobot@users.noreply.github.com> Date: Thu, 11 Apr 2024 18:12:07 +0100 Subject: [PATCH 06/12] Update .NET SDK to 9.0.100-preview.3.24204.13 (#439) * Update .NET SDK Update .NET SDK to version 9.0.100-preview.3.24204.13. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> * Bump .NET NuGet packages Bumps .NET dependencies to their latest versions for the .NET 9.0.100-preview.3.24204.13 SDK. Bumps AspNet.Security.OAuth.Apple from 9.0.0-preview.2.24162.89 to 9.0.0-preview.2.24211.54. Bumps Microsoft.AspNetCore.AzureAppServices.HostingStartup from 9.0.0-preview.2.24128.4 to 9.0.0-preview.3.24172.13. --- updated-dependencies: - dependency-name: AspNet.Security.OAuth.Apple dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.AzureAppServices.HostingStartup dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --------- Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --- global.json | 2 +- src/SignInWithApple/SignInWithApple.csproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index 89d7b15d..18401871 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100-preview.2.24157.14", + "version": "9.0.100-preview.3.24204.13", "allowPrerelease": false } } diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index ea4f4d50..30744c16 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -17,10 +17,10 @@ 4.0.0 - + - + From 37ac0453c951a7d1a1c73357cb7accb604d5f11e Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Thu, 11 Apr 2024 18:32:52 +0100 Subject: [PATCH 07/12] Bump AspNet.Security.OAuth.Apple Bump AspNet.Security.OAuth.Apple to preview 3 version. --- src/SignInWithApple/SignInWithApple.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index 30744c16..8d5909ab 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -17,7 +17,7 @@ 4.0.0 - + From 16a42d280a7704256d0f43ab0bf376eb5a482c4f Mon Sep 17 00:00:00 2001 From: martincostello Date: Thu, 11 Apr 2024 18:34:59 +0100 Subject: [PATCH 08/12] Re-enable request delegate generator Nullability issue is resolved. --- src/SignInWithApple/SignInWithApple.csproj | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index 8d5909ab..50235dec 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -5,8 +5,7 @@ SHA256 noble true - - false + true en-US Exe true From 82976b7bfd5e36f622c3b8ef7fb0e1cdcfb0ea73 Mon Sep 17 00:00:00 2001 From: costellobot <102549341+costellobot@users.noreply.github.com> Date: Tue, 21 May 2024 19:30:56 +0100 Subject: [PATCH 09/12] Update .NET SDK to 9.0.100-preview.4.24267.66 (#456) * Update .NET SDK Update .NET SDK to version 9.0.100-preview.4.24267.66. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> * Bump Microsoft.AspNetCore.AzureAppServices.HostingStartup from 9.0.0-preview.3.24172.13 to 9.0.0-preview.4.24267.6 Bumps Microsoft.AspNetCore.AzureAppServices.HostingStartup from 9.0.0-preview.3.24172.13 to 9.0.0-preview.4.24267.6. --- updated-dependencies: - dependency-name: Microsoft.AspNetCore.AzureAppServices.HostingStartup dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> * Fix build - Bump Apple OAuth provider for preview 4. - Fix ambiguous method. --------- Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> Co-authored-by: Martin Costello --- global.json | 2 +- .../SecurityHeadersMiddleware.cs | 36 +++++++++---------- src/SignInWithApple/SignInWithApple.csproj | 4 +-- 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/global.json b/global.json index 18401871..da80cf3f 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100-preview.3.24204.13", + "version": "9.0.100-preview.4.24267.66", "allowPrerelease": false } } diff --git a/src/SignInWithApple/SecurityHeadersMiddleware.cs b/src/SignInWithApple/SecurityHeadersMiddleware.cs index 0260daf8..d474e387 100644 --- a/src/SignInWithApple/SecurityHeadersMiddleware.cs +++ b/src/SignInWithApple/SecurityHeadersMiddleware.cs @@ -9,25 +9,23 @@ internal sealed class SecurityHeadersMiddleware(RequestDelegate next) { private static readonly string ContentSecurityPolicy = string.Join( ';', - [ - "default-src 'self'", - "script-src 'self' cdnjs.cloudflare.com", - "script-src-elem 'self' cdnjs.cloudflare.com", - "style-src 'self' cdnjs.cloudflare.com use.fontawesome.com", - "style-src-elem 'self' cdnjs.cloudflare.com", - "img-src 'self' data:", - "font-src 'self' cdnjs.cloudflare.com", - "connect-src 'self'", - "media-src 'none'", - "object-src 'none'", - "child-src 'none'", - "frame-ancestors 'none'", - "form-action 'self' appleid.apple.com", - "block-all-mixed-content", - "base-uri 'self'", - "manifest-src 'self'", - "upgrade-insecure-requests", - ]); + "default-src 'self'", + "script-src 'self' cdnjs.cloudflare.com", + "script-src-elem 'self' cdnjs.cloudflare.com", + "style-src 'self' cdnjs.cloudflare.com use.fontawesome.com", + "style-src-elem 'self' cdnjs.cloudflare.com", + "img-src 'self' data:", + "font-src 'self' cdnjs.cloudflare.com", + "connect-src 'self'", + "media-src 'none'", + "object-src 'none'", + "child-src 'none'", + "frame-ancestors 'none'", + "form-action 'self' appleid.apple.com", + "block-all-mixed-content", + "base-uri 'self'", + "manifest-src 'self'", + "upgrade-insecure-requests"); public Task Invoke(HttpContext context) { diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index 50235dec..8ffbc230 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -16,10 +16,10 @@ 4.0.0 - + - + From 8c3293d98c0685e3031c166d75efebb6afbe7eeb Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Fri, 31 May 2024 12:15:58 +0100 Subject: [PATCH 10/12] Use C# 13 Set `LangVersion=preview` to use C# 13. --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 9cdc5ce3..c4cdd38c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ Martin Costello Martin Costello (c) $([System.DateTime]::Now.ToString(yyyy)) enable - latest + preview Apache-2.0 git https://github.com/martincostello/SignInWithAppleSample.git From 9be5f16d327ee878e2e1a68e7b7d70bbd4c68c1b Mon Sep 17 00:00:00 2001 From: costellobot <102549341+costellobot@users.noreply.github.com> Date: Wed, 12 Jun 2024 06:29:32 +0100 Subject: [PATCH 11/12] Update .NET SDK to 9.0.100-preview.5.24307.3 (#472) * Update .NET SDK Update .NET SDK to version 9.0.100-preview.5.24307.3. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> * Bump .NET NuGet packages Bumps .NET dependencies to their latest versions for the .NET 9.0.100-preview.5.24307.3 SDK. Bumps AspNet.Security.OAuth.Apple from 9.0.0-preview.4.24271.72 to 9.0.0-preview.5.24311.76. Bumps Microsoft.AspNetCore.AzureAppServices.HostingStartup from 9.0.0-preview.4.24267.6 to 9.0.0-preview.5.24306.11. --- updated-dependencies: - dependency-name: AspNet.Security.OAuth.Apple dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.AzureAppServices.HostingStartup dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --------- Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --- global.json | 2 +- src/SignInWithApple/SignInWithApple.csproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index da80cf3f..3d2a0848 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100-preview.4.24267.66", + "version": "9.0.100-preview.5.24307.3", "allowPrerelease": false } } diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index 8ffbc230..f16fab6b 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -16,10 +16,10 @@ 4.0.0 - + - + From 3d57af36f57bd40e077db0cf972dbd443e8dfbde Mon Sep 17 00:00:00 2001 From: costellobot <102549341+costellobot@users.noreply.github.com> Date: Tue, 9 Jul 2024 18:57:17 +0100 Subject: [PATCH 12/12] Update .NET SDK to 9.0.100-preview.6.24328.19 (#480) * Update .NET SDK Update .NET SDK to version 9.0.100-preview.6.24328.19. --- updated-dependencies: - dependency-name: Microsoft.NET.Sdk dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> * Bump .NET NuGet packages Bumps .NET dependencies to their latest versions for the .NET 9.0.100-preview.6.24328.19 SDK. Bumps AspNet.Security.OAuth.Apple from 9.0.0-preview.5.24311.76 to 9.0.0-preview.6.24359.69. Bumps Microsoft.AspNetCore.AzureAppServices.HostingStartup from 9.0.0-preview.5.24306.11 to 9.0.0-preview.6.24328.4. --- updated-dependencies: - dependency-name: AspNet.Security.OAuth.Apple dependency-type: direct:production update-type: version-update:semver-major - dependency-name: Microsoft.AspNetCore.AzureAppServices.HostingStartup dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --------- Signed-off-by: costellobot <102549341+costellobot@users.noreply.github.com> --- global.json | 2 +- src/SignInWithApple/SignInWithApple.csproj | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/global.json b/global.json index 3d2a0848..cc957714 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "9.0.100-preview.5.24307.3", + "version": "9.0.100-preview.6.24328.19", "allowPrerelease": false } } diff --git a/src/SignInWithApple/SignInWithApple.csproj b/src/SignInWithApple/SignInWithApple.csproj index f16fab6b..b2e15f1d 100644 --- a/src/SignInWithApple/SignInWithApple.csproj +++ b/src/SignInWithApple/SignInWithApple.csproj @@ -16,10 +16,10 @@ 4.0.0 - + - +