Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Request.Scheme is not reliable and should not be used here for setting the Callback Url #929

Closed
@eat-sleep-code

Description

@eat-sleep-code

I have an application that requires https. When the authorization request goes to Microsoft for authentication, the redirect_url attribute shows up as &redirect_uri=http%3A%2F%2F. Note the http instead of https.

We believe we have tracked this to: https://github.com/aspnet/Security/blob/dev/src/Microsoft.AspNetCore.Authentication/AuthenticationHandler.cs#L118

Request.Scheme will incorrectly report 'http' even if originating URL is 'https'. I have confirmed this by placing @(Context.Request.Scheme) in the view of a page and loading that page under HTTPS.

Please either fix the Request.Scheme or provide a method of setting the callback path's request scheme.

I found two additional users who are having the same problem: https://social.msdn.microsoft.com/Forums/expression/en-US/833373e1-52ed-4d98-857a-ced4927a2dbb/azure-ad-authentication-for-core-web-app-uses-http-for-reply-url?forum=windowsazurewebsitespreview

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions