Starts in:
2 DAYS
23 HRS
3 MIN
4 SEC
Starts in:
2 D
23 H
3 M
4 S
Open Closed

I need help to create Identity server(Using Identity server 4 not openIdct) in latest ABP framework 8.2 + #7912


User avatar
0
nayan.ranjane@softtech-engr.com created

I am using abp framework 8.2 Dawnloaded layered template with ABP Studio and found that their is default implementation of openIdct but I want to use Identity server4. Hence followed following steps to convert from OpenIdct to Identity server

  1. https://abp.io/docs/8.2/release-info/migration-guides/identityserver4-step-by-step
  2. https://abp.io/docs/8.2/release-info/migration-guides/openiddict-mvc (This is implementation that provides identity server to OpenIdct for web but It is incomplete as not mensioned all dependecy of identity server for abp 8.2+)
  • ABP Framework version: v8.2
  • UI Type: MVC
  • Database System: EF Core (SQL )
  • Tiered (for MVC) or Auth Server Separated: yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • Dawnloaded layered template with ABP Studio and found that their is default implementation of openIdct but I want to use Identity server4. Hence followed following steps to convert from OpenIdct to Identity server
  1. https://abp.io/docs/8.2/release-info/migration-guides/identityserver4-step-by-step
  2. https://abp.io/docs/8.2/release-info/migration-guides/openiddict-mvc (This is implementation that provides identity server to OpenIdct for web but It is incomplete as not mensioned all dependecy of identity server for abp 8.2+)

58 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    This may be a problem, you can try adding LoggedOut.js to Pages/Account folder

    LoggedOut.js

    document.addEventListener("DOMContentLoaded", function (event) {
        setTimeout(function () {
            var redirectButton = document.getElementById("redirectButton");
            
            if(!redirectButton){
                return;
            }
                
            window.clientName = redirectButton.getAttribute("cname");
            window.location = redirectButton.getAttribute("href");
        }, 3000)
    });
    
    
  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Above code not worked for me sharing you console error

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    can you see the Sources tab to check if LoggedOut.js load correctly

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    it works for me

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Please resolve above issue asap also multifactor authentication with email and mobile is not working please send me configuration for the same I don't have folders inside pages sharing you reference screenshot where I have placed my loggedOut.js file

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Please resolve above issue asap also multifactor authentication with email and mobile is not working please send me configuration for the same

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Sharing you logs of security code generation of identity server mail is not getting triggered also added configuration in appsettings

    [11:41:34 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' [11:41:34 INF] Request finished HTTP/2 GET https://localhost:44366/Abp/ApplicationConfigurationScript - 200 6377 application/javascript 23.6263ms [11:41:37 WRN] USING NullEmailSender! [11:41:37 DBG] SendEmailAsync: [11:41:37 DBG] nayan.ranjane@softtech-engr.com [11:41:37 DBG] [11:41:37 DBG] Security Code [11:41:37 DBG] <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> </head> <body> <h3>Security Code</h3>

    &lt;p&gt;Your security code is: 057636&lt;/p&gt;
    

    </body> </html> [11:41:38 DB

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Also getting null value for profile picture after adding your code for logout code: 404 [11:56:37 INF] Request starting HTTP/2 POST https://localhost:44366/api/account/profile-picture - multipart/form-data; boundary=----WebKitFormBoundaryM1z9fwd4KnVrzHN2 53750 [11:56:37 INF] No CORS policy found for the specified request. [11:56:37 DBG] Get dynamic claims cache for user: dc6b6db5-77e4-6440-e031-39fa1c550ada [11:56:37 DBG] SessionId(e6be294d-9d6d-4e86-bfa0-520cf24f1976) found in cache, Updating hit count(10), last access time(10/4/2024 11:56:36 AM) and IP address(::1). [11:56:37 DBG] Update the session from cache because reached the maximum cache hit count(10). [11:56:37 DBG] Added 0 entity changes to the current audit log [11:56:37 DBG] Added 0 entity changes to the current audit log [11:56:37 DBG] Added 0 entity changes to the current audit log [11:56:37 INF] Request finished HTTP/2 POST https://localhost:44366/api/account/profile-picture - 404 0 null 20.008ms [11:56:37 INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: POST https://localhost:44366/api/account/profile-picture, Response status code: 404 [11:56:39 DBG] Executing HealthCheck collector HostedService.

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Please resolve above issue asap also multifactor authentication with email and mobile is not working please send me configuration for the same I don't have folders inside pages sharing you reference screenshot where I have placed my loggedOut.js file

    Should be Pages/Account folder : )

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Also getting null value for profile picture after adding your code for logout code: 404 [11:56:37 INF] Request starting HTTP/2 POST https://localhost:44366/api/account/profile-picture - multipart/form-data; boundary=----WebKitFormBoundaryM1z9fwd4KnVrzHN2 53750 [11:56:37 INF] No CORS policy found for the specified request. [11:56:37 DBG] Get dynamic claims cache for user: dc6b6db5-77e4-6440-e031-39fa1c550ada [11:56:37 DBG] SessionId(e6be294d-9d6d-4e86-bfa0-520cf24f1976) found in cache, Updating hit count(10), last access time(10/4/2024 11:56:36 AM) and IP address(::1). [11:56:37 DBG] Update the session from cache because reached the maximum cache hit count(10). [11:56:37 DBG] Added 0 entity changes to the current audit log [11:56:37 DBG] Added 0 entity changes to the current audit log [11:56:37 DBG] Added 0 entity changes to the current audit log [11:56:37 INF] Request finished HTTP/2 POST https://localhost:44366/api/account/profile-picture - 404 0 null 20.008ms [11:56:37 INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: POST https://localhost:44366/api/account/profile-picture, Response status code: 404 [11:56:39 DBG] Executing HealthCheck collector HostedService.

    what about this mail is not getting triggered for email confirmation in abp io

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Getting Error in profile picture updation of web project [14:31:37 DBG] Added 0 entity changes to the current audit log [14:31:37 DBG] Added 0 entity changes to the current audit log [14:31:37 INF] Request finished HTTP/2 POST https://localhost:44366/api/account/profile-picture - 404 0 null 13.2189ms [14:31:37 INF] Request reached the end of the middleware pipeline without being handled by application code. Request path: POST https://localhost:44366/api/account/profile-picture, Response status code: 404

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Sharing you logs of security code generation of identity server mail is not getting triggered also added configuration in appsettings

    [11:41:34 INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' [11:41:34 INF] Request finished HTTP/2 GET https://localhost:44366/Abp/ApplicationConfigurationScript - 200 6377 application/javascript 23.6263ms [11:41:37 WRN] USING NullEmailSender! [11:41:37 DBG] SendEmailAsync: [11:41:37 DBG] nayan.ranjane@softtech-engr.com [11:41:37 DBG] [11:41:37 DBG] Security Code [11:41:37 DBG] <!DOCTYPE html> <html lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> </head> <body> <h3>Security Code</h3>

    &lt;p&gt;Your security code is: 057636&lt;/p&gt; 
    

    </body> </html> [11:41:38 DB

    please resolve this

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I can't reproduce the problem.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    [11:41:37 WRN] USING NullEmailSender!

    https://abp.io/docs/latest/framework/infrastructure/emailing#nullemailsender

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Authenticator API is not working Verify Authenticator method from above snippet is not there please resolve asap

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    The images damaged

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    Please give steps for configuring authenticator app

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    From Admin UI if we clicked login with this user then got following error Volo.Abp.Account.Public.Web.Pages.Account.ImpersonateUserModel.OnPostAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+GenericTaskHandlerMethod.Convert<T>(object taskAsObject) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory+GenericTaskHandlerMethod.Execute(object receiver, object[] arguments) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger) Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext) Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider) Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) Volo.Abp.AspNetCore.Security.Claims.AbpDynamicClaimsMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Volo.Abp.AspNetCore.Uow.AbpUnitOfWorkMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Volo.Abp.AspNetCore.ExceptionHandling.AbpExceptionHandlingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Microsoft.AspNetCore.Builder.ApplicationBuilderAbpJwtTokenMiddlewareExtension+<>c__DisplayClass0_0+<<UseJwtTokenMiddleware>b__0>d.MoveNext() IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events, IBackChannelLogoutService backChannelLogoutService) IdentityServer4.Hosting.MutualTlsEndpointMiddleware.Invoke(HttpContext context, IAuthenticationSchemeProvider schemes) Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) IdentityServer4.Hosting.BaseUrlMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Volo.Abp.Studio.Client.AspNetCore.AbpStudioMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Volo.Abp.Studio.Client.AspNetCore.AbpStudioMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+InterfaceMiddlewareBinder+<>c__DisplayClass2_0+<<CreateMiddleware>b__0>d.MoveNext() Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    https://localhost:44300/api/account/verify-authenticator-code service not there

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I could not reproduce the problem using the project you provided, can you provide aother project?

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created

    API's are there but not able to use Microsoft.Authenticator app Steps to reproduce this issuen(Please guide me if any configuration is missing :

    1. Login with any user.
    2. Go to MyAccount Tab
    3. Go to Authenticator app
    4. Scan given qr code in authenticator app
    5. click on next page and add code present in authenticator app
    6. then getting following error [10:31:55 INF] Request starting HTTP/2 POST https://localhost:44300/api/account/verify-authenticator-code - application/json 17 [10:31:55 INF] No CORS policy found for the specified request. [10:31:55 DBG] Get dynamic claims cache for user: 654dd381-8404-b2e1-3b2d-3a1578068640 [10:31:55 DBG] SessionId(894082cd-a7f2-4635-ab03-4db2c8583221) found in cache, Updating hit count(0), last access time(10/8/2024 10:31:46 AM) and IP address(::1). [10:31:55 DBG] Updating the session from cache on the first check. [10:31:55 INF] Executing endpoint 'Volo.Abp.Account.AccountController.VerifyAuthenticatorCodeAsync (Volo.Abp.Account.Pro.Public.HttpApi)' [10:31:55 INF] Route matched with {area = "account", action = "VerifyAuthenticatorCode", controller = "Account", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.Account.VerifyAuthenticatorCodeDto] VerifyAuthenticatorCodeAsync(Volo.Abp.Account.VerifyAuthenticatorCodeInput) on controller Volo.Abp.Account.AccountController (Volo.Abp.Account.Pro.Public.HttpApi). [10:31:55 DBG] VerifyTwoFactorTokenAsync() failed for user. [10:31:55 WRN] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "Invalid user token!", "details": null, "data": {}, "validationErrors": null }

    [10:31:55 WRN] Invalid user token! Volo.Abp.UserFriendlyException: Invalid user token! at Volo.Abp.Account.AccountAppService.VerifyAuthenticatorCodeAsync(VerifyAuthenticatorCodeInput input) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, AbpAuditingOptions options, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope) at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at lambda_method5831(Closure, Object) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I could not reproduce the problem

  • User Avatar
    0
    nayan.ranjane@softtech-engr.com created
    1. I'm using microsoft authenticator app
    2. clicked on add account and scanned above scanner.
    3. and added code present over there?

    Please confirm if there is some mistake

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I'm using microsoft authenticator app clicked on add account and scanned above scanner. and added code present over there?

    That's what I did, I'm using microsoft authenticator app too.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06