Skip to content
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

V13: The login screen does not display external login errors #15715

Merged
merged 3 commits into from Feb 14, 2024

Conversation

iOvergaard
Copy link
Contributor

@iOvergaard iOvergaard commented Feb 14, 2024

Description

This fixes a regression compared from V12 to V13 where the new login screen UI did not show external login errors that happened on the server side. The is two-fold: BackOfficeController needed to have its built-in error messages migrated from V12, and the UmbracoLogin/Index.cshtml needed to hook on to those errors and forward them to the login screen UI.

Fixes #15622

How to test

Set a cookie containing external login errors somewhere, e.g. in the BackOfficeController:

var someerrormessage = @"{""errors"":[""Some error message""]}";
_httpContextAccessor.Response.Cookies.Append(ViewDataExtensions.TokenExternalSignInError, Convert.ToBase64String(Encoding.UTF8.GetBytes(someerrormessage)), new CookieOptions() { HttpOnly = true, Secure = true });

Verify that the error message shows up on the login screen below the welcome message.

Copy link
Contributor

@Migaroez Migaroez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and tests good!

@Migaroez Migaroez merged commit 1235521 into v13/dev Feb 14, 2024
15 checks passed
@Migaroez Migaroez deleted the v13/bugfix/login-screen-external-login-errors branch February 14, 2024 12:24
@nul800sebastiaan
Copy link
Member

@iOvergaard This broke the user panel in the backoffice - I can't see from a quick glance exactly what is wrong but this is how it looks in the RC now:

image

Error:

angular.js:15697 Error: [$injector:unpr] http://errors.angularjs.org/1.8.3/$injector/unpr?p0=externalLoginInfoProvider%20%3C-%20externalLoginInfo%20%3C-%20externalLoginInfoService
    at angular.js:99:1
    at angular.js:4991:19
    at Object.d [as get] (angular.js:5151:32)
    at angular.js:4996:28
    at d (angular.js:5151:32)
    at e (angular.js:5176:58)
    at Object.invoke (angular.js:5200:18)
    at Object.$get (angular.js:5043:20)
    at Object.invoke (angular.js:5208:16)
    at angular.js:4997:20 '<div ng-if="model.view &amp;&amp; !model.animating &amp;&amp; !model.$parentScope" ng-include="model.view" class="ng-scope">'

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

Successfully merging this pull request may close these issues.

None yet

3 participants