Giter VIP home page Giter VIP logo

webapp-openidconnect-dotnetcore21's Introduction

WebApp-OpenIDConnect-DotNetCore21

An ASP.NET Core 2.1 web application that authenticates an end user against Azure AD B2C using the ASP.NET Core 2.1 Azure AD B2C authentication middleware, acquires an access token using MSAL.NET, and accesses a web API using this access token.

webapp-openidconnect-dotnetcore21's People

Contributors

chrispadgettlivecom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

webapp-openidconnect-dotnetcore21's Issues

AcquireTokenByAuthorizationCodeAsync always returns empty acesstoken.

Hi, thanks for providing a good solution for .NET Core 2.1, when Microsoft is lacking behind.
I have a question though; When you acquire token, it always returns a AuthenticationResult where the AccessToken property is empty. Is this supposed to happen, or have done something wierd?

Question: How to fill these values?

Hi,

May I have this question:

I understand how to create a tenant on Azure. And I created my app under my Azure AD B2C. But, how can I get those values:

"ApiScopes": "https://fabrikamb2c.onmicrosoft.com/demoapi/demo.read",
"ApiUrl": "https://fabrikamb2chello.azurewebsites.net/hello",
"CallbackPath": "/signin-oidc",
"ClientId": "90c0fe63-bcf2-44d5-8fb7-b8bbc0b29dc6",
"ClientSecret": "v0WzLXB(uITV5*Aq",
"Domain": "fabrikamb2c.onmicrosoft.com",
"EditProfilePolicyId": "b2c_1_edit_profile",
"Instance": "https://login.microsoftonline.com/tfp",
"RedirectUri": "https://localhost:44316/signin-oidc",
"ResetPasswordPolicyId": "b2c_1_reset",
"SignUpSignInPolicyId": "b2c_1_susi"

Need to specify sslPort after cloning

Hi Chris, and thanx again for putting this example together.

As per your comment on stack overflow, after cloning this repository to a local machine, one needs to edit the Properties -> launchSettings.json file so that iisSettings:sslPort is 44316, not whatever VS defines when it first opens the solution. 44316 is the port the "playground" Azure AD B2C configuration expects.

Error if Microsoft Identity Client 2.3.1 used

Hi,

with the Microsoft Identity Client >2.0.0 the method AcquireTokenByAuthorizationCodeAsync returns AADSTS50049: Unknown or invalid instance.

I tried with a tenant authority then I set the ValidateAuthority property to false.
With v 1.1.4 no problems at all.

Best Regards

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.