Git Product home page Git Product logo

aspnetrun / run-aspnet-identityserver4 Goto Github PK

View Code? Open in Web Editor NEW
232.0 10.0 143.0 1.11 MB

Secure microservices with using standalone Identity Server 4 and backing with Ocelot API Gateway. Protect our ASP.NET Web MVC and API applications with using OAuth 2 and OpenID Connect in IdentityServer4. Securing your web application and API with tokens, working with claims, authentication and authorization middlewares and applying policies.

Home Page: https://www.udemy.com/course/secure-net-microservices-with-identityserver4-oauth2openid/?couponCode=APRI24

License: MIT License

C# 30.08% HTML 10.33% CSS 0.51% SCSS 58.94% JavaScript 0.14%
identityserver4 openid-connect oauth2 microservices security aspnet ocelot-gateway aspnetcore

run-aspnet-identityserver4's People

Contributors

mehmetozkaya avatar

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  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

run-aspnet-identityserver4's Issues

IdentityServer4 redirection failed for .NET Core2.1

-> In identityServer4 I am using version 2.5.4
->.Net Core 2.1

Describe the bug

I created the IdentityServer project, it runs successfully, and I got the /.well-known/openid-configuration data also.
And Then I create a client project, In this project when I hit the [Authorize] controller [e.g "https://localhost:6001/weatherforecast"], it will redirect to the IdentityServer for login.
After logging in successfully, it will redirect to the client page.
The above three steps are the actual process.
But now the above two steps are working successfully, and after logging in, it will not redirect to the client page it will be on the identity server page only and I am not getting token also.
When I enter my login credentials, on clicking the Log In button, it will redirect to the client page.

Login callback

Note: in https works.

In the client configuration I have set : options.RequireHttpsMetadata = false;

I started all 4 projects in http, when I log in starting from the Movies.Client project I am correctly redirected to the login page but when I enter the username and password it passes the authentication but remains on the login page emptying the fields.

public async Task Login(LoginInputModel model, string button)
{
if (context != null)
{
if (context.IsNativeClient())
{
// The client is native, so this change in how to
// return the response is for better UX for the end user.
return this.LoadingPage("Redirect", model.ReturnUrl);
}

                    // we can trust model.ReturnUrl since GetAuthorizationContextAsync returned non-null
                    return Redirect(model.ReturnUrl); //<--- this is callback point 
                }

}

value of model.ReturnUrl:

/connect/authorize/callback?client_id=movies_mvc_client&redirect_uri=http%3A%2F%2Flocalhost%3A5002%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20address%20email%20roles%20movieAPI&response_mode=form_post&nonce=638082631024847403.NDhkZTliZGQtOTE2OC00Y2ZlLThiN2YtMjY4NWRlMTg0YTlmMTdkN2EyY2UtZDYzYS00NzFmLTk2MWItMTZlMTEwZDk2M2Vh&state=CfDJ8HOOEFXrK5JKrX5f57CzT1FtIUsTzOTxm2gOAg4X-k7wBtJuSXuswiJBTp5S4n2BlvdyhDx7uncp7fa488eL-VOiapqglHfovIarcThh_wlf6o5aW7SEe2LN6hOfxHqHZdVopMpQxk6cBP63rE8Sr-3Qpth4H5U9rGTE6cW8jgKU0is03N95sZMFSCpGm1pGH7y_29gMQ2qfmFZOLr0w3sZeV9w9RwfteJ-2cAItNwV3BXuo6HcY38POd4lrjucuLGnfPCFYQSHcyx2WISdVFRQ3eLrhM-bw_SB4KCX8xPhc&x-client-SKU=ID_NETSTANDARD2_0&x-client-ver=6.15.1.0

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.