Hi
Thank you for your response. I do see the following in the AuthServer logs:
2024-09-23 10:21:46.065 +02:00 [DBG] Get SessionId(878aac30-416e-48db-a4de-c425a6ef793f) from IdentitySessionManager. 2024-09-23 10:21:47.448 +02:00 [WRN] Could not find SessionId(878aac30-416e-48db-a4de-c425a6ef793f) in the database.
However if I look in the AbpSessions table in the database I do find a record for the session Id in questions (878aac30-416e-48db-a4de-c425a6ef793f)
I hope this helps in resolving the issue.
OpenIdConnectProtocolException: Message contains error: 'invalid_grant', error_description: 'SessionExpired', error_uri: 'error_uri is null'. Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest)
AuthenticationFailureException: An error was encountered while handling the remote login. Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler<TOptions>.HandleRequestAsync()
Hi I upgraded my project to the last ABP framework (v8.3.0)
There was a compilation error in which I needed to add the following to my DbContext: public DbSet<IdentitySession> Sessions { get; set; }
I then attempted to run the solution again and go the following post logging in:
Debug log below:
[22:53:04 INF] Request finished HTTP/2 POST https://localhost:44382/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%3Fclient_id%3DPekkishPOS_BlazorServerTiered%26redirect_uri%3Dhttps%253A%252F%252Flocalhost%253A44370%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520roles%2520email%2520phone%2520PekkishPOS%26response_mode%3Dform_post%26nonce%3D638625486411992936.Yzc2NWViY2EtOWNkOS00NWJhLTkwYWUtNzU3NDQ5MjBlZTViNzhhM2Y4N2MtNzE3MS00NjMxLTkwYTUtZDllNDhkYzcxMTdj%26state%3DCfDJ8BAQRgbFZOhKvnVuRTbVeaRCJBwfd-tIq56xB0og-OgpLwCJuL8tQa-dsroNzzABDQKY8NgBzJgG8Ho0dYhAnRY41qlSNPm54l521OhRfC3VkmiWcVJei1tNeT0nCMBxD_3Tq9aXPa02r_KD-KZP1L2FBGdbu9KLmheIMfhizDned5D8O2-WRoh9u7OcwjoPNsXv-oOfUP_2uYYQgU8j9ZE6uM1Dlo-G58VAvc0pMkADc4uaebW7ZW4ZgLVuQZZ9NvYmr7G5l7kgGHeEWe7wA_xblG30zF1ohSJcQ98_qZO3%26x-client-SKU%3DID_NET8_0%26x-client-ver%3D7.5.1.0 - 302 0 null 10288.7018ms [22:53:04 INF] Request starting HTTP/2 GET https://localhost:44382/connect/authorize?client_id=PekkishPOS_BlazorServerTiered&redirect_uri=https%3A%2F%2Flocalhost%3A44370%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20roles%20email%20phone%20PekkishPOS&response_mode=form_post&nonce=638625486411992936.Yzc2NWViY2EtOWNkOS00NWJhLTkwYWUtNzU3NDQ5MjBlZTViNzhhM2Y4N2MtNzE3MS00NjMxLTkwYTUtZDllNDhkYzcxMTdj&state=CfDJ8BAQRgbFZOhKvnVuRTbVeaRCJBwfd-tIq56xB0og-OgpLwCJuL8tQa-dsroNzzABDQKY8NgBzJgG8Ho0dYhAnRY41qlSNPm54l521OhRfC3VkmiWcVJei1tNeT0nCMBxD_3Tq9aXPa02r_KD-KZP1L2FBGdbu9KLmheIMfhizDned5D8O2-WRoh9u7OcwjoPNsXv-oOfUP_2uYYQgU8j9ZE6uM1Dlo-G58VAvc0pMkADc4uaebW7ZW4ZgLVuQZZ9NvYmr7G5l7kgGHeEWe7wA_xblG30zF1ohSJcQ98_qZO3&x-client-SKU=ID_NET8_0&x-client-ver=7.5.1.0 - null null
[2OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+AttachHttpResponseCode1[[OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]]. [22:53:58 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+AttachCacheControlHeader
1[[OpenIddict.Server.OpenIddictServerEvents+ApplyAuthorizationResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[22:53:58 INF] The authorization response was successfully returned to 'https://localhost:44370/signin-oidc' using the form post response mode: {
"code": "[redacted]",
"id_token": "[redacted]",
"state": "CfDJ8BAQRgbFZOhKvnVuRTbVeaRCJBwfd-tIq56xB0og-OgpLwCJuL8tQa-dsroNzzABDQKY8NgBzJgG8Ho0dYhAnRY41qlSNPm54l521OhRfC3VkmiWcVJei1tNeT0nCMBxD_3Tq9aXPa02r_KD-KZP1L2FBGdbu9KLmheIMfhizDned5D8O2-WRoh9u7OcwjoPNsXv-oOfUP_2uYYQgU8j9ZE6uM1Dlo-G58VAvc0pMkADc4uaebW7ZW4ZgLVuQZZ9NvYmr7G5l7kgGHeEWe7wA_xblG30zF1ohSJcQ98_qZO3",
"iss": "https://localhost:44382/"
}.
1[[OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[22:54:00 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+AttachCacheControlHeader1[[OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]]. [22:54:00 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+AttachWwwAuthenticateHeader
1[[OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[22:54:00 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext was successfully processed by Volo.Abp.Account.Web.ExtensionGrants.LinkLoginExtensionGrantProcessJsonResponse.
[22:54:00 INF] The response was successfully returned as a JSON document: {
"error": "invalid_grant",
"error_description": "SessionExpired"
}.
[22:54:00 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ProcessJsonResponse1[[OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]]. [22:54:00 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext was marked as handled by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ProcessJsonResponse
1[[OpenIddict.Server.OpenIddictServerEvents+ApplyTokenResponseContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[22:54:00 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessErrorContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+Exchange+ApplyTokenResponse1[[OpenIddict.Server.OpenIddictServerEvents+ProcessErrorContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]]. [22:54:00 DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessErrorContext was marked as handled by OpenIddict.Server.OpenIddictServerHandlers+Exchange+ApplyTokenResponse
1[[OpenIddict.Server.OpenIddictServerEvents+ProcessErrorContext, OpenIddict.Server, Version=5.5.0.0, Culture=neutral, PublicKeyToken=35a561290d20de2f]].
[22:54:00 INF] Request finished HTTP/1.1 POST https://localhost:44382/connect/token - 400 74 application/json;charset=UTF-8 1465.9255ms
[22:54:00 WRN] The operation was canceled.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.CancellationToken.ThrowIfCancellationRequested()
at Volo.Abp.Caching.StackExchangeRedis.AbpRedisCache.SetManyAsync(IEnumerable1 items, DistributedCacheEntryOptions options, CancellationToken token) at Volo.Abp.Caching.DistributedCache
2.<>c__DisplayClass54_0.<<SetManyAsync>g__SetRealCache|0>d.MoveNext()
[22:54:00 INF] Request finished HTTP/2 GET https://localhost:44382/connect/authorize?client_id=PekkishPOS_BlazorServerTiered&redirect_uri=https%3A%2F%2Flocalhost%3A44370%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20roles%20email%20phone%20PekkishPOS&response_mode=form_post&nonce=638625486411992936.Yzc2NWViY2EtOWNkOS00NWJhLTkwYWUtNzU3NDQ5MjBlZTViNzhhM2Y4N2MtNzE3MS00NjMxLTkwYTUtZDllNDhkYzcxMTdj&state=CfDJ8BAQRgbFZOhKvnVuRTbVeaRCJBwfd-tIq56xB0og-OgpLwCJuL8tQa-dsroNzzABDQKY8NgBzJgG8Ho0dYhAnRY41qlSNPm54l521OhRfC3VkmiWcVJei1tNeT0nCMBxD_3Tq9aXPa02r_KD-KZP1L2FBGdbu9KLmheIMfhizDned5D8O2-WRoh9u7OcwjoPNsXv-oOfUP_2uYYQgU8j9ZE6uM1Dlo-G58VAvc0pMkADc4uaebW7ZW4ZgLVuQZZ9NvYmr7G5l7kgGHeEWe7wA_xblG30zF1ohSJcQ98_qZO3&x-client-SKU=ID_NET8_0&x-client-ver=7.5.1.0 - 200 null text/html;charset=UTF-8 56699.6435ms
[22:56:39 INF] Application is shutting down...
[22:56:39 DBG] Stopped background worker: Volo.Abp.Identity.Session.IdentitySessionCleanupBackgroundWorker
[22:56:39 DBG] Stopped background worker: Volo.Abp.OpenIddict.Tokens.TokenCleanupBackgroundWorker
Thank you for the support. Issue resolved
PS C:\Users\User\source\repos\Pekkish\Pekkish.PekkishPOS> npm install --global yarn
added 1 package in 890ms
PS C:\Users\User\source\repos\Pekkish\Pekkish.PekkishPOS> abp install-libs
ABP CLI 8.0.2
Found 2 projects.
C:\Users\User\source\repos\Pekkish\Pekkish.PekkishPOS\src\Pekkish.PekkishPOS.AuthServer
C:\Users\User\source\repos\Pekkish\Pekkish.PekkishPOS\src\Pekkish.PekkishPOS.Blazor
Running Yarn on C:\Users\User\source\repos\Pekkish\Pekkish.PekkishPOS\src\Pekkish.PekkishPOS.AuthServer
yarn install v1.22.21
info No lockfile found.
(node:21772) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > chokidar > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > anymatch > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning @volo/account > @abp/uppy > uppy > @uppy/core > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/account > @abp/uppy > uppy > @uppy/aws-s3 > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/account > @abp/uppy > uppy > @uppy/dashboard > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/account > @abp/uppy > uppy > @uppy/store-redux > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/account > @abp/uppy > uppy > @uppy/xhr-upload > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/bootstrap > bootstrap@5.3.3" has unmet peer dependency "@popperjs/core@^2.11.8".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 48.07s.
Running Yarn on C:\Users\User\source\repos\Pekkish\Pekkish.PekkishPOS\src\Pekkish.PekkishPOS.Blazor
yarn install v1.22.21
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
⠁ (node:39324) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > gulp-cli > matchdep > micromatch > snapdragon > source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > gulp-cli > matchdep > micromatch > snapdragon > source-map-resolve > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > gulp-cli > matchdep > micromatch > snapdragon > source-map-resolve > source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > gulp-cli > matchdep > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > chokidar@2.1.8: Chokidar 2 does not receive security updates since 2019. Upgrade to chokidar 3 with 15x fewer dependencies
warning @volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/aspnetcore.mvc.ui > gulp > glob-watcher > chokidar > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
warning @volo/cms-kit-pro.admin > @abp/cms-kit.admin > @abp/uppy > uppy > @uppy/aws-s3 > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/cms-kit-pro.admin > @abp/cms-kit.admin > @abp/uppy > uppy > @uppy/core > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/cms-kit-pro.admin > @abp/cms-kit.admin > @abp/uppy > uppy > @uppy/dashboard > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/cms-kit-pro.admin > @abp/cms-kit.admin > @abp/uppy > uppy > @uppy/store-redux > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/cms-kit-pro.admin > @abp/cms-kit.admin > @abp/uppy > uppy > @uppy/xhr-upload > cuid@2.1.8: Cuid and other k-sortable and non-cryptographic ids (Ulid, ObjectId, KSUID, all UUIDs) are all insecure. Use @paralleldrive/cuid2 instead.
warning @volo/language-management > @abp/flag-icon-css > flag-icon-css@4.1.7: The project has been renamed to flag-icons
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@volo/abp.aspnetcore.mvc.ui.theme.leptonx > @volo/abp.aspnetcore.mvc.ui.theme.commercial > @abp/aspnetcore.mvc.ui.theme.shared > @abp/bootstrap > bootstrap@5.3.3" has unmet peer dependency "@popperjs/core@^2.11.8".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 35.14s.
Hi, thank you for instructions.
I installed yarn v1.22.19 and then re-ran abp install-libs.
Still the same unfortunately