Is it posible to add additional QueryParameters when using Authentication.Challenge [Question]
See original GitHub issueWhen using MSAL.js I am able to send additional query string parameters to the identity provider using extraQueryParameters
when calling loginRedirect.
I now need to do this in the context of an ASP.NET MVC application and cannot work out how to add extra query string parameters to the url used when creating the challenge.
If I cannot add the extra param the AzureB2C tenant that I am required to use will not accept the request and fails. Likely the provider here could/should fix this but we’ve been able to make this work for our SPA applications and it’s frustrating me not to find a solution for a webApp
Current code:
var extraParams = new Dictionary<string, string>{{"customParam", "value"}};
var authProps = new AuthenticationProperties(extraParams) { RedirectUri = "/" };
HttpContext.GetOwinContext().Authentication.Challenge(authProps);
It looks like the extraParams are getting encoded up in the state rather than adding extra parameters to the query string
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to add extra query parameter to authorization
Hi, I'm trying to connect to an API using OAuth2, that requires me to include an extra query parameter in the Authorization URL....
Read more >c# - Owin, pass custom query parameters in Authentication ...
We want to pass custom query parameter in Authentication request using Owin middleware. And we cannot find the way how to implement this...
Read more >Create Auth challenge Lambda trigger
This Lambda trigger is invoked to create a challenge to present to the user. The request for this Lambda trigger includes the challengeName...
Read more >What Are Query Strings & Parameters - How to Optimize
A query string is a set of characters tacked onto the end of a URL. The query string begins after the question mark...
Read more >What is challenge-response authentication?
A static challenge includes the password recovery questions one needs to answer to verify identity. A common example is the password for the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks so much for this, it was exactly what we needed to unblock us 😃
Closing as I believe this is answered. Feel free to reopen if you disagree, @gavinbarron