-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASP.NET Core 5 Standalone Blazor Webassembly Remote Register does not work #29246
Comments
Thanks for contacting us. |
@mkArtakMSFT @pranavkm thanks for prioritizing the issue. One more issue I found today while investigating this further. As per official Microsoft documentation and RFC Open ID standard (See 4.2. OpenID Provider Configuration Response) The Open Id Configuration discovery endpoint can fully describe the login, registration and user management. The Open Id standard already provides authorization_endpoint, token_endpoint, userinfo_endpoint and registration_endpoint. So if an Identity Provider already provides you with a .well-known/openid-configuration and specifies the authorization, registration and user info end points then there should not be any need to provide RemoteRegisterPath and RemoteProfilePath again. The Login workflow already honors this, and so should registration and user info endpoints. So there are actualy 2 major issues as I see in the current workflow : 1. ASP.NET Core Blazor Webassembly should fully honor the RFC Open ID standard and endpoints provided by .well-known/openid-configuration and once the clients configure the open Id identity provider there should not be any need to specify remote AuthenticationPaths paths in the first place. For e.g.
2. If for some reason client does require a different RemoteRegisterPath and RemoteProfilePath then the issue described above should honor the external endpoints and redirect them correctly (original issue). I think both these issues are important for a seamless external OIDC Identity provider integration. Also the documentation should be improved for the advanced use cases. Again I appreciate you prioritizing this and thanks in advance. Feel free if more info is needed. |
I also encounter this problem on aspnet core 3.1. The problem seems to be due to the use of PathAndQuery in RedirectToProfile and RedirectToRegister which doesn't include the base url. |
Hello, @javiercn sorry to ping you but since you wrote the code in question, you may confirm that this is indeed a bug and that it is indeed in RedirectToProfile and RedirectToRegister. |
@ameyasubhedar Just was wondering if you got any solution or any workaround until this is fixed. I'm using a standalone Blazor app as well, but cannot configure the flow yet. @mkArtakMSFT @pranavkm Any update on this would be much appreciated. Thanks! |
@abdu292, not yet I am also working on this issue and evaluating any potential workaround. Will keep you posted. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
We need this feature badly. Its a road blocker for us |
@ameyasubhedar took another look at this issue and there are some things to point out. In general, when you are dealing with a third-party provider the register process goes through the login step (that's for example what Azure AD B2C does with policies). The remote register here refers to Remote to the Blazor app, but still in the same origin. You can have full control of the register flow by overriding There is no contract for an IdP to redirect you back to a given url unless the user starts an OIDC login flow. In our RemoteRegister case we pass in the return URL as a query string parameter and Microsoft.AspNetCore.Identity happens to use that and return back to the login page (after which we do a login and since the user authenticated during registration, it succeeeds). With the suggestion above (overriding OnParametersSet and taking control of the register action) you should be able to implement this. |
This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes. See our Issue Management Policies for more information. |
Describe the bug
A standalone Blazor app (eg. localhost:44399) that is not hosted with ASP.NET Core will mostly rely on external Identity provider for registration and login. The redirect to remote register URL does not work.
Lets assume localhost:44382 is the server that manage the authentication and profile management.
Now in the Client Standalone Blazor App (localhost:44399) I will configure the remote register and profile paths from server. Note there are external paths.
If I click on the Register on my client app, the code ignores the external server host localhost:44382 address tries to redirect to the relative register path of the client host address localhost:44399...
Obviously there is nothing there and registration fails. I think this is a major issue, basically due to this bug the Blazor standalone app cannot work with external Identity provider for user registration.
Further technical details
The text was updated successfully, but these errors were encountered: