Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update application via OpenId Recipe and get error An application with the same client identifier already exists #7162

Closed
hung-doan opened this issue Sep 29, 2020 · 1 comment

Comments

@hung-doan
Copy link

I use Recipe to add or update Application in OpenId Module.
I run the Recipe for the first time. It added the Application successfully.
However I run it again (without any modification). I got the error "An application with the same client identifier already exists"

About OC

  • OC Version: 1.0.0-rc2-14350

Recipe steps

  "steps": [
    {
      "name": "OpenIdApplication",
      "ClientId": "mywebsite",
      "DisplayName": "My Website",
      "AllowPasswordFlow": true,
      "AllowRefreshTokenFlow": true,
      "Type": "public"
    }

  ]

Error

{"errors":{"validations":["OpenIddict.Abstractions.OpenIddictExceptions+ValidationException: One or more validation error(s) occurred while trying to create a new application:\r\n\r\nAn application with the same client identifier already exists.\r\n\r\n   at OpenIddict.Core.OpenIddictApplicationManager`1.CreateAsync(TApplication application, String secret, CancellationToken cancellationToken)\r\n   at OpenIddict.Core.OpenIddictApplicationManager`1.CreateAsync(OpenIddictApplicationDescriptor descriptor, CancellationToken cancellationToken)\r\n   at OpenIddict.Core.OpenIddictApplicationManager`1.OpenIddict.Abstractions.IOpenIddictApplicationManager.CreateAsync(OpenIddictApplicationDescriptor descriptor, CancellationToken cancellationToken)\r\n   at OrchardCore.OpenId.Recipes.OpenIdApplicationStep.ExecuteAsync(RecipeExecutionContext context) in C:\\projects\\orchardcore\\src\\OrchardCore.Modules\\OrchardCore.OpenId\\Recipes\\OpenIdApplicationStep.cs:line 89\r\n   at OrchardCore.Recipes.Services.RecipeExecutor.<>c__DisplayClass9_0.<<ExecuteStepAsync>b__0>d.MoveNext() in C:\\projects\\orchardcore\\src\\OrchardCore\\OrchardCore.Recipes.Core\\Services\\RecipeExecutor.cs:line 175\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at OrchardCore.Environment.Shell.Scope.ShellScope.UsingAsync(Func`2 execute) in C:\\projects\\orchardcore\\src\\OrchardCore\\OrchardCore.Abstractions\\Shell\\Scope\\ShellScope.cs:line 206\r\n   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteStepAsync(RecipeExecutionContext recipeStep) in C:\\projects\\orchardcore\\src\\OrchardCore\\OrchardCore.Recipes.Core\\Services\\RecipeExecutor.cs:line 154\r\n   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, Object environment, CancellationToken cancellationToken) in C:\\projects\\orchardcore\\src\\OrchardCore\\OrchardCore.Recipes.Core\\Services\\RecipeExecutor.cs:line 100\r\n   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, Object environment, CancellationToken cancellationToken) in C:\\projects\\orchardcore\\src\\OrchardCore\\OrchardCore.Recipes.Core\\Services\\RecipeExecutor.cs:line 117\r\n   at OrchardCore.Recipes.Services.RecipeExecutor.ExecuteAsync(String executionId, RecipeDescriptor recipeDescriptor, Object environment, CancellationToken cancellationToken)\r\n   at OrchardCore.Recipes.Controllers.AdminController.Execute(String basePath, String fileName) in C:\\projects\\orchardcore\\src\\OrchardCore.Modules\\OrchardCore.Recipes\\Controllers\\AdminController.cs:line 107\r\n   at lambda_method(Closure , Object )\r\n   at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)\r\n   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)"]},"title":"One or more validation errors occurred!","status":500,"detail":"Please refer to the errors property for additional details."}
@deanmarcussen
Copy link
Member

Duplicate of #6364

@deanmarcussen deanmarcussen marked this as a duplicate of #6364 Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants