Skip to content

Instantly share code, notes, and snippets.

View szilardd's full-sized avatar

Szilard David szilardd

View GitHub Profile
@szilardd
szilardd / MyTokenExtensionGrant.cs
Created January 12, 2023 12:58
How to add a custom grant type in OpenIddict for existing user
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Tokens;
using OpenIddict.Abstractions;
using OpenIddict.Server;
using OpenIddict.Server.AspNetCore;
using System;