Giter Club home page Giter Club logo

rocksolidknowledge / samples.identityserver.adminuiintegration Goto Github PK

View Code? Open in Web Editor NEW
60.0 13.0 18.0 2.66 MB

IdentityServer 4 implementation using the ASP.NET Identity schema from the IdentityExpress Admin UI product

Home Page: https://www.identityserver.com/products/

License: Apache License 2.0

C# 8.89% CSS 85.89% JavaScript 2.65% Dockerfile 0.07% HTML 2.49%
authentication identityserver identityserver4 identityexpress admin ui adminui

samples.identityserver.adminuiintegration's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samples.identityserver.adminuiintegration's Issues

AdminUI configuration with UseOpenIdConnectAuthentication

If I use the configuration in this repo with UseOpenIdConnectAuthentication in a federated pattern, I am unable to get the redirects back to the return url to work properly. It lands on this and doesnt do another redirect:

http://ids:5003/account/login?returnUrl=%2Fconnect%2Fauthorize%2Flogin%3Fclient_id%3Djs%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A5004%252Fpopup.html%26response_type%3Dtoken%26scope%3Dapi1%26state%3D83007e9527034efb83efb1e2d755d03c%26display%3Dpopup

The database I am using is built by the "identityserverregistry.azurecr.io/idxapi" docker image.

If i remove the following configuration items:

     services
                .AddIdentityExpressAdminUiConfiguration(builder)
                .AddIdentityServerUserClaimsPrincipalFactory()
                ;


            services.AddScoped<IUserStore<IdentityExpressUser>>(x =>
            {
                return new IdentityExpressUserStore(x.GetService<IdentityExpressDbContext>())
                {
                    AutoSaveChanges = true
                };
            });

And:

                .AddAspNetIdentity<IdentityExpressUser>()

And:

app.UseIdentity();

It works perfectly fine...

Here is what my UseOpenIdConnectAuthentication configuration looks like:

 app.UseCookieAuthentication(new CookieAuthenticationOptions
            {
                AuthenticationScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme,
                AutomaticAuthenticate = false,
                AutomaticChallenge = false
            });

            var openIdList = new[]
            {
                new
                {
                    DisplayName = "ptgadspike.onmicrosoft.com",
                    ClientId = "17d673f4-c719-48a8-98ff-714556d5e13a",
                    TenantId = "edb8aeb7-8177-4665-91e8-b528abdcdf33",
                    SchemaName = "spike1",
                },
                new
                {
                    DisplayName = "ptgadspike2.onmicrosoft.com",
                    ClientId = "61a59626-a872-4de0-bd8a-7c507e015d78",
                    TenantId = "24a9b864-f468-4f88-bf94-3e60941ce1f5",
                    SchemaName = "spike2",
                },
            };

            openIdList.ToList().ForEach(item =>
            {
                app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
                {
                    AuthenticationScheme = item.SchemaName,
                    DisplayName = item.DisplayName,
                    SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme,
                    ClientId = item.ClientId,
                    Authority = $"https://login.microsoftonline.com/{item.TenantId}",
                    ResponseType = OpenIdConnectResponseType.IdToken,
                    SignedOutCallbackPath = $"/signedout-oidc/{item.SchemaName}",
                    CallbackPath = $"/signin-oidc/{item.SchemaName}"
                });
            });

Any ideas?

Thanks,
Ryan

How to create seed admin accoun?

Hi Team,

I manage to get the Database Migrated. Is there a way to create a seed Admin account? I managed to create an account and log in but it keeps complaining that I don't have any applications to manage.

Any help on this would be great.

Ross

No database schema created

Hi,

I think this might be my misunderstanding of what this project is meant to do, but I've built and ran it, but can see no database tables being created.

Am I meant to do something to get the schema created in the database?
Is this project not for creating a sample admin ui?

If you could point me in the direction of anything that would be great.

Matt

AdminUI API Swagger not executing the values

Dear All,

I am working on AdminUI API, I have configured and run entity framework migrations on my identity server database. However when I try to access AdminUI API swagger UI , I cannot get the values from Get API listed on page (for users, claims, clients etcs.)

Could you please give me some pointers to resolve this ?

Thanks

Sonal

Database migrations

Hi All,
Hopefully this is the right place to ask this question, please let me know if there is a better place to ask it.

I am trying to setup the database prior to deploying for AdminUI + API via docker (likely). I have a separate IdentityServer.

I want to create a separate console app or assembly (and use dotnet ef) to create the database and do migrations.

In the mean time, I am trying to do it through my website for now:

serviceScope.ServiceProvider.GetRequiredService<IdentityServer4.EntityFramework.DbContexts.PersistedGrantDbContext>().Database.Migrate();
serviceScope.ServiceProvider.GetRequiredService<IdentityServer4.EntityFramework.DbContexts.ConfigurationDbContext>().Database.Migrate();
serviceScope.ServiceProvider.GetRequiredService<IdentityExpress.Identity.IdentityExpressDbContext>().Database.Migrate();

But it doesn't create three of the tables that are used by AdminUI:

ExtendedClients
ExtendedIdentityResources
ExtendedApiResources

How do I create those?

Thanks,
Ryan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.