openiddict

Rich Twitter Digits/Google Auth with OpenIdDictServer

柔情痞子 提交于 2019-12-17 16:54:08
问题 Our app requires sign-in by either mobile number or Google. We are planning to Twitter Digits for mobile number authentication. The flow of registration and authentication as I understand is as below: Mobile app does rich authentication with Twitter Digits or Google Sign In (it’s better user experience for the user to do rich auth instead of opening a web browser tab). Twitter Digits / Google Sign In returns Identity Token. Mobile app calls AuthServer to SignIn and presents Identity Token.

openid connect - identifying tenant during login

无人久伴 提交于 2019-12-13 11:49:06
问题 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 ask the user for account slug (company/tenant slug) and during login user should provide the slug along with username and password . But there is no parameter in open id request to send the slug. Create an OAuth application at the time of

How can you implement refresh tokens in a web app - angularjs

末鹿安然 提交于 2019-12-13 01:26:25
问题 I am using token based security in my web app. The server side is wrote using c# and i am using openiddict for logging in and issuing tokens, found here. I am currencyly using Implict flow. By default my tokens have a lifespan of 1 hour, after that you have to logging again. I have locked down my API to accept bearer tokens only and not cookies. I wanted to implement refresh tokens but after reading many websites, it appears that implementing refresh tokens on a web app, is not a good way to

.NET Core + Openiddict InvalidCastException

感情迁移 提交于 2019-12-12 17:23:38
问题 I'm using openiddict on a .net core 1.1 project. So far i was able to login through /connect/token endpoint. Suddenly, without any changes to the controller i get the following exception InvalidCastException: Unable to cast object of type 'AspNet.Security.OpenIdConnect.Primitives.OpenIdConnectRequest' to type 'OpenIddict.OpenIddictOptions'. Is there anyone else having the same issue? 回答1: API changes have been introduced in ASOS 2.0.0-rc1-final that are incompatible with the exact OpenIddict

An unhandled exception occurred while processing the request in OpenIddict

和自甴很熟 提交于 2019-12-12 10:48:46
问题 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 : https://github.com/openiddict/openiddict-core/tree/dev/samples The db registers the database correctly, the settings is loaded and everything works here. The tables in the db: __efmigrationshistory , aspnetroleclaims , aspnetroles , aspnetuserclaims , aspnetuserlogins , aspnetuserroles ,

How to Generate AccessToken for user who is logged in with External Providers

↘锁芯ラ 提交于 2019-12-12 06:11:43
问题 I have an API implemented by asp.net core. I've used OpenIddict to generate access token and refresh token for users who registered to my api by email and password. I've added Google middleware (.UseGoogleAuthentication ... ) to my API and I can successfully log in user with Google. My client is UWP and I use WebAuthenticationBroker to get redirected to google after sending a reuest to localhost/Account/ExternalLogin/Google. when the users is logged In with google he is redirected to Account

OpenIddict: Using AddDevelopmentSigningCertificate()

柔情痞子 提交于 2019-12-11 12:04:03
问题 I created an Asp.Net Core 2.2 application with DefaultIdentity using OpenIddict with the Implicit flow. This application runs in a Docker container. I am trying to use the AddDevelopmentSigningCertificate() option for my development environment. services.AddOpenIddict() .AddCore(options => { options.UseEntityFrameworkCore() .UseDbContext<ApplicationDbContext>(); }) .AddServer(options => { options.UseMvc(); options.EnableAuthorizationEndpoint("/connect/authorize"); options.RegisterScopes

OpenIddict error with AddSigningCertificate

耗尽温柔 提交于 2019-12-11 10:15:56
问题 I am trying to signin certificate (OpenIddict), but I get error when trying with thumbprint: options.AddSigningCertificate(Configuration["Certificate"]/* db b9 12 .... 22 */); and the error: Application startup exception: System.Security.Cryptography.CryptographicException: OpenCSP failed with error code 2148073494. in this line: app.UseOpenIddict(); If I tried with X509Certificate2 I also get error: var cert = new X509Certificate2(Configuration["Certificate"]/*path to file.cer*/); options

Register OpenIddict entities into DbContext in another way

帅比萌擦擦* 提交于 2019-12-11 05:35:29
问题 Is there another way to register the entity sets needed by OpenIddict onto a DbContext except calling options.UseOpenIddict(); in services.AddDbContext<OpenIdDictDbContext>(options => {...}) . I have trouble with this approach, because I have more DbContexts , and I want to share DbContextOptions . In .Net Core 2, if you can use non generic DbContextOptions for all DbContexts OR you must have nongeneric DbContextOptions<T> for all DbContexts . So, I would like the first approach if it

ASP.NET Core Openiddict throws “An OpenID Connect response cannot be returned from this endpoint”

爷,独闯天下 提交于 2019-12-10 11:13:52
问题 I follow instruction in openiddict server example using password flow from https://github.com/openiddict/openiddict-samples/tree/master/samples/PasswordFlow but have no success. It throws InvalidOperationException: An OpenID Connect response cannot be returned from this endpoint at route /connect/token : return SignIn(ticket.Principal, ticket.Properties, ticket.AuthenticationScheme); Postman params: Content-Type: application/x-www-form-urlencoded Params: username=..&password=...&grantType