Questions tagged [openiddict]

Versatile OpenID Connect stack for ASP.NET Core and Microsoft.Owin (compatible with ASP.NET 4.6.1). For official support, please visit https://github.com/openiddict/openiddict-core/issues/new/choose.

OpenIddict aims at providing a versatile solution to implement an OpenID Connect server and token validation in any ASP.NET Core 2.1, 3.1 and 5.0 application, and starting in OpenIddict 3.0, any ASP.NET 4.x application using Microsoft.Owin too.

For official support, please visit https://github.com/openiddict/openiddict-core/issues/new/choose.

442 questions
35
votes
1 answer

IdentityServer4 vs AspNet.Security.OpenIdConnect.Server vs OpenIddict

In an attempt to understand what I may use for OpenId Connect Server implementation, I have looked into what each of them is: IdentityServer4: an OpenID Connect and OAuth 2.0 framework for ASP.NET Core 2. AspNet.Security.OpenIdConnect.Server:…
Set
  • 47,577
  • 22
  • 132
  • 150
24
votes
6 answers

AddJwtBearer OnAuthenticationFailed return custom error

I am using Openidict. I am trying to return custom message with custom status code, but I am unable to do it. My configuration in startup.cs: services.AddAuthentication(options => { options.DefaultAuthenticateScheme =…
Makla
  • 9,899
  • 16
  • 72
  • 142
23
votes
2 answers

ASP.NET Core Identity SPA with React

I am confused and a bit lost about using ASP.NET Core Identity with a React SPA. I have read Microsoft documentation about ASP.NET Core Identity several times, mostly focusing on the Identity with SPA section, and yet I have to confess I still don't…
14
votes
3 answers

openid connect - identifying tenant during login

I have a multi-tenant (single database) application which allows for same username/email across different tenants. At the time of login (Implicit flow) how can I identify the tenant? I thought of following possibilities: At the time of registration…
adnan kamili
  • 8,967
  • 7
  • 65
  • 125
11
votes
1 answer

How to reach signup page of openiddict authorization server?

I have built opeiddict as separate web application as authorization server. I am stuck with small problem, that is how I can go to user registration page directly though a link from the client web application. Right now I can go to login page, as…
Zafrul Hassan
  • 163
  • 2
  • 12
9
votes
2 answers

How to retrieve ClaimsPrincipal from JWT in asp.net core

In my solution, I have two projects. 1) Web API and 2) MVC. I am using ASP.NET Core. API issues JWT token and MVC consumes it to get protected resources. I am using openiddict library to issue JWT. In MVC project, in AccountController Login method,…
Nishith Shah
  • 313
  • 1
  • 3
  • 11
9
votes
2 answers

Social registration in SPA (Angular 2) with ASP.NET Core REST API

I have implemented simple Angular 2 application which uses ASP.NET Core WebApi as backend. For authentication I added '/login' route that generates JWT access and refresh tokens that in turn stored by SPA in localStorage and used in HTTP…
Roman Kolesnikov
  • 11,777
  • 11
  • 44
  • 67
8
votes
1 answer

Signing keys, certificates and client secrets confusion

I am somewhat confused with the difference between certificates and signing keys and have a few questions.... I have OpenIddict configured to use JWT Bearer Authentication. 1) What is the difference between AddDevelopmentSigningCertificate() and…
Pacificoder
  • 1,581
  • 4
  • 18
  • 32
8
votes
3 answers

An unhandled exception occurred while processing the request in OpenIddict

So, I'm trying to implement OpenIddict version 1.0.0-beta2-0580 with NET core 1.1 and I get the following error: An unhandled exception occurred while processing the request This is based on this :…
Nyranith
  • 367
  • 2
  • 6
  • 15
8
votes
1 answer

Exchanging a google idToken for local openId token c#

I am using this github project https://github.com/openiddict/openiddict-core which is great. But I am stuck as to what the procedures should be, or how to implement them, when the user uses an external identity provider, for this example, I will…
Gillardo
  • 9,518
  • 18
  • 73
  • 141
8
votes
2 answers

How do you troubleshoot AspNet Core missing dependencies?

So I made a change to my project.json which caused a re-restore which is coming up with a bunch of unresolvable dependencies. How do you figure out what is going on here? This was definitely working as I wrote quite a bit of code against this…
jmorc
  • 560
  • 1
  • 3
  • 14
7
votes
1 answer

Is there a way to have different ticket expiry lengths in OpenIddict?

I have an app using OpenIddict for token authorization (access and refresh tokens) and overall, it's working great. The problem is that my use case has multiple app types (web and mobile) using the same authorization server. I'd like to have…
Jason
  • 2,455
  • 4
  • 37
  • 48
7
votes
1 answer

userManager.FindByName does not return roles

I am using OpenIddict for token authentication. Yesterday when I call userManager.FindByNameAsync(request.Username) I get User with Roles. Today I get user with Roles property count = 0. I tried to load roles with await…
Makla
  • 9,899
  • 16
  • 72
  • 142
7
votes
1 answer

.NET Core WebAPI + OpenIdDict (credentials flow) and Angular2 client: 401 after successful login (full repro)

I'm trying to create an Angular2 SPA consuming a .NET Core Web API protected using OpenIdDict, with credentials flow. In creating a repro solution for this issue, I have also detailed all my steps in a readme, so hope this post can be useful to…
Naftis
  • 4,393
  • 7
  • 63
  • 91
7
votes
2 answers

Authorize via JWT Token

ASP.NET Core 5 with ASP.NET Identity 3.0, I'm using both web pages and apis. I am using OpenIddict to issue a JWT token and to authenticate. My code looks as such: X509Certificate2 c = new X509Certificate2(@"tokensign.p12",…
Adam
  • 3,872
  • 6
  • 36
  • 66
1
2 3
29 30