I mean any other way to do the same? as I mentioned to secure api's (web.host) for different tenants (clients) with different secure key or key pair for each clients?
Hello @ismcagdas,
I have generated issue on github please find the below links:
https://github.com/aspnetzero/aspnet-zero-core/issues/2934
Thanks for reply, So any other way, you would like to suggest to secure api's (web.host) for different tenants (clients) with different secure key or key pair for each clients? using jwt or any other way for Asp net zero (Angular + Asp net core).
Please suggest
Regards,
Thanks for the information @maliming.
Is the below scenario possible for public and private key.
Having single private key and different public keys for different tenant and manage and validate request using jwt in asp .net zero project?
Hello ismcagdas,
yes, I am using Azure AD B2C. When I click on forgotpassword link from sign in page for external authentication using openID connect, It redirect me to the login page with below mentioned error. And It's keep showing loader on login page as Console error genrates due to this.
core.js:4002 ERROR Error: Uncaught (in promise): OAuthErrorEvent: {"type":"token_error","reason":{},"params":{"error":"access_denied","error_description":"AADB2C90118:+The+user+has+forgotten+their+password.\r\nCorrelation+ID:+d7cf1acf-a8ec-0000-0000-7e290f1d362a\r\nTimestamp:+2020-01-09+09:54:37Z\r\nlogin_hint:[email protected]\r\n","state":"Ln2xfKzgXGyD_6yCecWlUh9A6Cw1bY0YCxnoGeZitLi6Z;openIdConnect=1"}} at resolvePromise (zone.js:836) at resolvePromise (zone.js:795) at zone.js:897 at ZoneDelegate.invokeTask (zone.js:431) at Object.onInvokeTask (core.js:26247) at ZoneDelegate.invokeTask (zone.js:430) at Zone.runTask (zone.js:198) at drainMicroTaskQueue (zone.js:611) defaultErrorLogger @ core.js:4002
Hello Any comments on above query.
If I click on the forgot password link from the third party sign in page (opens after I click on log in with openidconnect from angular app) It gives me following error in angular app.
core.js:4002 ERROR Error: Uncaught (in promise): OAuthErrorEvent: {"type":"token_error","reason":{},"params":{"error":"access_denied","error_description":"AADB2C90118:+The+user+has+forgotten+their+password.\r\nCorrelation+ID:+d7cf1acf-a8ec-0000-0000-7e290f1d362a\r\nTimestamp:+2020-01-09+09:54:37Z\r\nlogin_hint:[email protected]\r\n","state":"Ln2xfKzgXGyD_6yCecWlUh9A6Cw1bY0YCxnoGeZitLi6Z;openIdConnect=1"}}
at resolvePromise (zone.js:836)
at resolvePromise (zone.js:795)
at zone.js:897
at ZoneDelegate.invokeTask (zone.js:431)
at Object.onInvokeTask (core.js:26247)
at ZoneDelegate.invokeTask (zone.js:430)
at Zone.runTask (zone.js:198)
at drainMicroTaskQueue (zone.js:611)
defaultErrorLogger @ core.js:4002
Where I need to set URL for Forgot password policy created in Azure ad b2c in OpenId section in appsettings.json ?
OR need to manage differently in asp net zero. please suggest
My project is Core + angular
Hi ismcagdas,
I have already tried before the same from your previous comments on difference active directory b2c related issues, but not working before. But Now I have added below things in appsettings.json and it's working fine.
"ValidateIssuer": "false",
"ClaimsMapping": [
{
"claim": "unique_name",
"key": "emails"
},
{
"claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
"key": "http://schemas.microsoft.com/identity/claims/objectidentifier"
}
]
Thanks a lot for help.
Can you please help me out following things. 1. how to set Reset password policy for the Azure AD B2C 2. how to set Edit profile policy for the Azure AD B2C
As I can on find the LoginURl field in OpenId in appsettings.json So can you please let know where I can add logic for policy cretaed for edit profile and reset password for external user login using AD B2C?
Thanks.
Hi @malining,
Working on project core + angular latest version
at System.Linq.ThrowHelper.ThrowNoMatchException()
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at Abp.AspNetZeroCore.Web.Authentication.External.OpenIdConnect.OpenIdConnectAuthProviderApi.<GetUserInfo>d__1.MoveNext()
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at ProjectDemo.Web.Controllers.TokenAuthController.<GetExternalUserInfo>d__39.MoveNext() in
...\Demo.Web.Core\Controllers\TokenAuthController.cs:line 492
WARN 2020-01-02 16:15:14,755 [29 ] Mvc.ExceptionHandling.AbpExceptionFilter - Sequence contains no matching element
Abp.UI.UserFriendlyException: Sequence contains no matching element
at ProjectDemo.Web.Controllers.TokenAuthController.GetExternalUserInfo(ExternalAuthenticateModel model) in ...\Demo.Web.Core\Controllers\TokenAuthController.cs:line 504
at ProjectDemo.Web.Controllers.TokenAuthController.ExternalAuthenticate(ExternalAuthenticateModel model) in ...\Demo.Web.Core\Controllers\TokenAuthController.cs:line 365
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
Any updates on above problem?