Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

AzureAdB2COptions.RedirectUri not working #51

Closed
grantbowering opened this issue May 18, 2018 · 2 comments
Closed

AzureAdB2COptions.RedirectUri not working #51

grantbowering opened this issue May 18, 2018 · 2 comments

Comments

@grantbowering
Copy link

Is it the intent of this code forRedirectUri property on the AzureAdB2COptions class (set in my appsettings.json) to end up the redirect_uri= querystring parameter of the /te/[tenant]/[policy]/oauth2/v2.0/authorize? call?

Because it sure doesn't.
It's ignoring it.

My RedirectUri is set to http://localhost:3456/app/signin-oidc, but what gets sent in that call is &redirect_uri=http%3A%2F%2Flocalhost%3A3456%2Fsignin-oidc...
as in, conspicuously missing the /app part. Which is real important.

So I tried just putting random things into that property and confirmed it's not using it at all, it seems to just be sending the origin server + /signin-oidc no matter WHAT is in the RedirectUri!

Is there somewhere extra this needs to be assigned that this sample code is missing, or is it just not for what I thought it was?

And if the latter, does that mean that this sample just doesn't work if it's not serving at the server root?

@soorajpm
Copy link

soorajpm commented Jun 7, 2018

Hi,

You can override the Redirect URI in the OnRedirectToIdentityProvider event. Example:
public Task OnRedirectToIdentityProvider(RedirectContext context) { context.ProtocolMessage.RedirectUri = "https://localhost:3456/app/signin-oidc"; }

Make sure the Redirect URI is updated in the Application Registration page

@jmprieur
Copy link
Contributor

Closing this issue as this sample is being archived and replaced by a newer ASP.NET Core 3.1 sample.
See Readme.md

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants