identityserver4

How to authorize a Blazor WebAssembly SPA app using Identity Server

点点圈 提交于 2020-12-12 04:37:41
问题 I am writing a demo Blazor WebAssembly SPA technical demo app, but I have some problems with authentication. I'm going to use Identity Server to do the authorization but i can't find any libraries to support it. All the tutorials I found guided to use Blazor Server or add an ASP.net Core hosted, but it's not really make sense for my demo app. I am glad if anyone can help. Thank you 回答1: March 12th, 2020 To add OIDC to an existing Blazor WASM app using an existing OAuth identity provider read

Cannot get Username / given_name when using angular-oauth2-oidc and Identity Server 4

时间秒杀一切 提交于 2020-12-08 06:47:23
问题 I am following the Implicit Workflow example from the angular-oauth2-oidc documentation. Everything works well in my Angular app, and I can login (during which I am redirected to Identity Server), get my token and use this token to access my Web Api. However, I have noticed that the "given_name" claim is null, and therefore, the username is not displayed on the login page. Specifically, the following method from the sample code appears to return null: public get name() { let claims = this

Identity server 4 post login redirect not working in chrome only

天大地大妈咪最大 提交于 2020-12-03 07:25:42
问题 i use identity server 4 let call it "auth-server" run on .net core 3.1. there is angular app request authentication after redirected to auth-server and provide credentials submiting the login it's not redirect back to client app. the issue is only in chrome browser (firefox & edge works fine) i can see the redirect request - Request-Url but it just go back to login page Client congig: public static IEnumerable<Client> GetClients() { return new List<Client>(){ new Client() { RequireConsent

Core + Vue 后台管理基础框架2——认证

一曲冷凌霜 提交于 2020-11-15 17:48:10
1、前言   这块儿当时在IdentityServer4和JWT之间犹豫了一下,后来考虑到现状,出于3个原因,暂时放弃了IdentityServer4选择了JWT: (1)目前这个前端框架更适配JWT; (2)前后端分离的项目,如果上IdentityServer4,还要折腾点儿工作,比如前端配置、多余的回调等; (3)跨度太大,团队、系统、历史数据接入都是问题,解决是可以解决,但时间有限,留待后续吧;   当然,只是暂时放弃,理想中的最佳实践还是IdentityServer4做统一鉴权的。 2、JWT认证实现 (1)Common项目下定义JWTConfig配置对象 (2)系统配置文件中增加JWT参数配置 此处配置与(1)中的配置对象是对应的。 (3)JWT处理程序及相关服务注册 1 services.Configure<JWTConfig>(Configuration.GetSection( " JWT " )); 2 var jwtConfig = Configuration.GetSection( " JWT " ).Get<JWTConfig> (); 3 services.AddAuthentication(options => 4 { 5 options.DefaultAuthenticateScheme = JwtBearerDefaults