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
3
votes
0 answers

How can I combine OpenIddict and Azure AD SSO to allow local fine-grained authorization?

I have an Angular SPA that already has an authentication/authorization system built on top of OpenIddict. It has been working just fine. We have a new client requirement to add the possibility of SSO through Azure AD (connecting to a specific…
3
votes
0 answers

How to achieve authorization code flow with PKCE with mobile app (React Native)?

For the past few days, I have been wondering about the authentication issue in mobile applications. I am in the process of implementing a mobile application using React Native. I'm also implementing an API for this application using .NET Core 6.0…
3
votes
1 answer

Login Page redirect is missing port - OpenIddict/MSIdentity & Blazor on nginx production server

I'm working on a Blazor project (asp.net core hosted) that is published on a Linux host, with Nginx which is working as a web server and proxy to redirect calls to my domain with a specific port to my application. (https://example:9999 =>…
Zasam
  • 63
  • 2
  • 17
3
votes
0 answers

.Net 5 Web API Authorization Server OpenIdDict with Custom DB Store (NO EF)

I am wokring on a .NET 5 POC with custom storage provider and adding authorization server with OpenIDDict. I am able to get the custom store implementation working but I am unable to wire up the authorization server to use the custom store…
3
votes
1 answer

The authentication demand was rejected because the token had no audience attached

I want to authenticate the API resources using client credentials. I have been able to generate the token successfully. While sending the request for the API I logged the error and it says: 2021-06-10T00:47:19.1953056+05:45 [ERR]…
Rasik
  • 1,961
  • 3
  • 35
  • 72
3
votes
1 answer

Refresh token with OpenIddict returns always principal to null

Since the migration from OpenIdDict 2.x to 3.X, we are not able to use refreshtoken anymore. Our code is based on dotnet core 3.1 The processing of user/password works fine and the user receives his tokens (access, id and refresh) But as soon as we…
hugo
  • 1,829
  • 1
  • 18
  • 47
3
votes
1 answer

How to ignore Self Signed Certificate issue in client validation

I've been trying to look into how I can disable SSL certificate validation by the HttpClient used to send request to the authorization metadata endpoint. I am running the authoriation server locally using hostname idp.local.test.com with haproxy as…
Daniel Jee
  • 664
  • 5
  • 10
3
votes
2 answers

The OpenIddict ASP.NET Core server cannot be used as the default scheme handler

I'm trying OpenIddict 3.0. I followed the steps in the documentation, created an Authorize controller, and added a test application. When I try to run I get this exception: The OpenIddict ASP.NET Core server cannot be used as the default scheme…
fingers10
  • 6,675
  • 10
  • 49
  • 87
3
votes
1 answer

OpenIdDict (Code Flow) - Handling Access Token Expiration

I'm working on a refactor in a ASP.Net Core 2.1 application to swap from the Implicit flow using a SPA, to an Authorization Code flow using an MVC client app. Since we're using the OpenIDDict library, I followed the documented Code Flow Example…
playtoh
  • 381
  • 3
  • 8
3
votes
2 answers

ASP.NET CORE 2.0 - [Authorize] doen't block the rest api access to unauthorized user

I am just learning a ASP.NET CORE. I have successfully implemented a openiddict to secure my api. After successful login user gets a token and that token is used for accessing web api but it is allowing unauthorized user too(i.e. the one who does't…
Chris Hadfield
  • 494
  • 1
  • 7
  • 34
3
votes
2 answers

InvalidOperationException: Scheme already exists: Bearer

I recently resumed work on a project that had lain dormant for a year. It was using Angular on AspNet Core 1.1 and using an early version of OpenIddict 1.0. It was developed using VS2017. I updated VS2017 to the latest release (15.7.5) but the…
Martin Horton
  • 822
  • 3
  • 10
  • 19
3
votes
2 answers

Allow "semi anonymous" authentication

I have a case where I need some controller methods to be accessible either by an authenticated user, or if the request contains a sort of "acccess token" in the url. For example: Either an authenticated user could make a call…
Joel
  • 8,502
  • 11
  • 66
  • 115
3
votes
0 answers

Openiddict : Introspection not working when Identity and resource server are in different projects

A .net core 2.0 web api, setup using openiddict and the code using Implicit flow. My Identity and resource server are in different projects. I have test cases to ensure authorized user should get an access, but valid access token users are getting…
Satish
  • 99
  • 1
  • 9
3
votes
1 answer

How to authorize SignalR Core Hub method with JWT

I am using JWT authentication in my ASP.NET Core 2.0 application with OpenIddict. I am following idea in this thread and calling AuthorizeWithJWT method after SignalR handshake. But now, I do not know what should I set in AuthorizeWithJWT method so…
Makla
  • 9,899
  • 16
  • 72
  • 142
3
votes
1 answer

OpenIdDict and ASP.NET Core: 401 after successfully getting the token back (full repro)

still periodically struggling with OpenAuth using OpenIdDict (credentials flow) in ASP.NET Core, I updated to the latest OpenIdDict bits and VS2017 my old sample code you can find at https://github.com/Myrmex/repro-oidang, with a full step-by-step…
Naftis
  • 4,393
  • 7
  • 63
  • 91