Comments (6)
Works locally, but unfortunately this does not work for me when I publish to production. I'm still getting the issue where the redirect URL is using http under the hood instead of https and hence doesn't match my https app redirect configuration.
Even if I hard code the string in the OnRedirectToIdentityProvider delegate it doesn't appear to be taking it into account.
Ideas? This seems to be a prevalent and very annoying black box type bug. Still no reply from the MS team.
from active-directory-b2c-dotnetcore-webapp.
I'm getting this same error in ASP.NET Core 2.2 when deploying into App Engine.
from active-directory-b2c-dotnetcore-webapp.
I found a fix for this and will be issuing a pull request. If for some reason the PR is declined, add this to the top of OnRedirectToIdentityProvider
in OpenIdConnectOptionsSetup
:
if (context.ProtocolMessage.RedirectUri.Contains("http:"))
{
context.ProtocolMessage.RedirectUri = context.ProtocolMessage.RedirectUri.Replace("http:", "https:");
}
from active-directory-b2c-dotnetcore-webapp.
@elvogel Your solution worked for us. Thanks
from active-directory-b2c-dotnetcore-webapp.
In the months since I posted this, the libraries have upgraded and this has become a moot point, as the current libraries have greatly simplified a good deal of this plumbing.
That being said - can you confirm that you're hitting this OnRedirectToIdentityProvider
event?
from active-directory-b2c-dotnetcore-webapp.
Closing this issue as this sample is being archived and replaced by a newer ASP.NET Core 3.1 sample.
See Readme.md
from active-directory-b2c-dotnetcore-webapp.
Related Issues (20)
- got secure error when I try to sign in HOT 2
- Not compatible with aspnet core 2.1 HOT 1
- User.Identity.Name is null and HttpContext.User.Claims is empty HOT 6
- ERROR Account username: Missing from the token response environment login.microsoftonline.com home account id: AccountId: XXXX HOT 8
- Single-Sign Out AD B2C HOT 2
- NullReferenceException in MSALSessionCache constructor HOT 1
- acquireTokenSilent sometimes returns a null accesstoken HOT 1
- Error messages in OnRemoteFailure should be url encoded before appending to query string HOT 3
- Latest version of AAD B2C? HOT 2
- Update the repository to not use Bower HOT 3
- Update the repository to use the latest MSAL version HOT 2
- b2clogin.com for ASP.NET Core HOT 7
- No accounts being returned on cca.GetAccountsAsync()
- Words 'simple' and 'dead simple' should be removed from content. HOT 1
- Unit testing for SessionController HOT 1
- Compatibility with .NET Core 3.1 HOT 2
- How do I diagnose errors? HOT 1
- How to pass domain_hint while calling B2C for login HOT 1
- How to select a policy at runtime?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from active-directory-b2c-dotnetcore-webapp.