-
Notifications
You must be signed in to change notification settings - Fork 2.9k
V13: New login screen #14780
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
Merged
Merged
V13: New login screen #14780
Changes from all commits
Commits
Show all changes
297 commits
Select commit
Hold shift + click to select a range
675cf7d
implement interface
iOvergaard bce23c8
add build targets for login screen
iOvergaard 57754a3
package lock
JesmoDev 2c8590e
move components to pages folder
JesmoDev 9536793
load logo and background from property
JesmoDev 6a13a88
styling
JesmoDev 78181c2
move mocks around
iOvergaard 684c9ea
remove unused vars
iOvergaard e470feb
add backoffice handlers
iOvergaard b62e394
install rxjs
iOvergaard b5eb697
add mock data
iOvergaard 9d68434
add element and context for localization
iOvergaard c21198d
mock data
iOvergaard e06deda
use umb-localize
iOvergaard ac64975
remove the extra logic with check for section_
iOvergaard 4eb4997
change key for login button
iOvergaard c7914b9
add base to vite environment
JesmoDev 00db825
login styling
JesmoDev 7240587
cleanup and button styling
JesmoDev 9159997
use correct reset url
JesmoDev 7a47154
change body of reset request
JesmoDev 3ee86fa
validate password reset code
JesmoDev 61d8c1e
redirect to /login/new on reset password code verify
iOvergaard 9abcae7
add obsolete messages
iOvergaard b536aa9
remove inline scripts for old backoffice
iOvergaard 46ae282
remove shadowdom from localize element
iOvergaard 789bd0a
Revert "remove shadowdom from localize element"
iOvergaard 09ee495
hook up reset password to api
JesmoDev bb39ea2
rename pages to state as it is not actually used as different pages
JesmoDev c6cd15a
reset password styling
JesmoDev 6d4deca
more styling
JesmoDev cdf079a
add confirmation page to new password
JesmoDev 272e495
set router to firstUpdated to avoid rAF
iOvergaard 626112e
set a custom baseUrl on the router to make sure it works without trai…
iOvergaard 758fb25
use route parameters to redirect on the login page to ensure correct …
iOvergaard 8c57941
add server variables
iOvergaard 9756ba0
make sure auth layout uses the provided properties for images
iOvergaard cf68804
format
JesmoDev 431c4bd
redirect to code expired page
JesmoDev e7077ae
add missing properties
JesmoDev 6561146
use allowPasswordReset and allowInvite properties in routing and layout
JesmoDev 10ee30e
make ts happy
JesmoDev be6e4eb
cleanup
JesmoDev 181bb94
init invite page
JesmoDev 06cc1a7
hook up usernameIsEmail
JesmoDev de106c3
init external login providers
JesmoDev 30fda82
add mock provider
JesmoDev 6812064
add padding to buttons
JesmoDev 6915746
replace uui button with normal button
JesmoDev a32a669
add external login providers as slot
JesmoDev 7fa91d0
add disableLocalLogin property
JesmoDev 7607ed4
add form to external login providers
JesmoDev 9fdd2d3
remove unused method
JesmoDev 16b1b84
fix build errors
iOvergaard 99dea29
add attributes for external login
iOvergaard d464ae6
add custom view to external login
iOvergaard 733f2c2
add new custom icon registry
iOvergaard 67f9927
attach two icon registries
iOvergaard 518fe5b
use relative paths
iOvergaard 03b2275
use relative paths
iOvergaard 1fafb1c
use main registry instead of providing directly
iOvergaard b2c64c1
add look and color to external login
iOvergaard d816b7c
implement getIcons() method
iOvergaard d794c21
use getIcons() to request icons
iOvergaard 0c6659d
install remixicon to supplement backoffice icons (replacing font-awes…
iOvergaard 57d92f0
move icon registries to auth element
iOvergaard ec5e62e
Revert "install remixicon to supplement backoffice icons (replacing f…
iOvergaard 1d75287
add icons for common external providers
iOvergaard 096abb2
add more icons
iOvergaard 841bc46
remove resetCode hack as it is no longer needed
JesmoDev c6d25a1
add validation to new password
JesmoDev d722a12
get gretting from translation file
JesmoDev 9384808
add hack to get text left aligned in uui-button
JesmoDev 04bc4a6
add custom router
JesmoDev 37b19ae
WIP Use router
JesmoDev cf89c7c
also change the URL during an action
JesmoDev dcb8ce8
update login action to redirect to /new when needed
JesmoDev 6d1a2f4
redirect to login from reset and new if not allowed
JesmoDev a7846ed
fix new password button href
JesmoDev 1965c10
use property on login element instead of context
JesmoDev fceae4c
check for redirect on invite-user
JesmoDev 11d67af
move fake external login providers to index.html for use in dev server
iOvergaard 891d4f4
allow password reset on dev server
iOvergaard 2088981
add look and color
iOvergaard ef8577f
only set styles for default view buttons
iOvergaard cc47fb3
suppress vite import warning
iOvergaard d4832b2
check and inform for errors and show 'nothing' if a custom view fails…
iOvergaard 6f339e9
fix mock path for localizedtext
iOvergaard 745fa7c
fix build errors
iOvergaard ddd111e
ensure that msw (and all its dependencies) do not end up in the produ…
iOvergaard 532ffff
Revert AngularValueExternalLoginInfoScriptAsync removal
iOvergaard 00cb2db
forward the providerName to custom views
iOvergaard a3aaa65
change default icon
iOvergaard 1945b63
add button look and color to external login provider options
iOvergaard 8d846dc
add obsolete to ButtonStyle and add a mapper to new values
iOvergaard ebb143c
add required xml comments
iOvergaard b3743e0
map external login providers to <umb-login-external />
iOvergaard f88b789
fix typo
iOvergaard b00ef18
only show external login layout if there are slotted children
iOvergaard eb8f72f
pass on name as "provider"
iOvergaard cc244dc
send externalLoginUrl to custom views
iOvergaard f82e304
cleanup
JesmoDev a097fef
global import
JesmoDev c841d91
hide external logins completely when empty
JesmoDev 3bd3edb
cleanup
JesmoDev ee4d809
setup redirect to invite
JesmoDev d43f5d4
rename pages to name-page
JesmoDev 03d6637
fix names and paths
JesmoDev f4f7d7a
use new password layout for invite and new password
JesmoDev 748bb1a
add comments
JesmoDev d04af57
cleanup and use confirmation element
JesmoDev ccaac10
set parameters after successful verifyinvite
iOvergaard 201df58
map display-name and provider-name to the external element
iOvergaard 9e2422e
map display-name
iOvergaard 470d08b
set up external login to handle correct display- and provider-name wi…
iOvergaard 3e65548
add support for disabling local login
iOvergaard f257b4c
update path to handlers
iOvergaard 856e2c7
add more localization
iOvergaard c36bb28
add handlers for 2fa
iOvergaard 725f0eb
router should support a factory for component
iOvergaard 2bc3de4
push login to ?flow=mfa on 402 codes
iOvergaard 79c7a76
add page to handle 2fa/mfa
iOvergaard da77d4f
add support for custom routing
iOvergaard e66a0fe
add fallback for welcome greeting
iOvergaard d92dcb7
handle AngularJS silliness
iOvergaard 2d9d4d7
fix typo
JesmoDev 012705e
Merge remote-tracking branch 'origin/v13/dev' into v13/feature/new-lo…
iOvergaard 26c9377
fix router and replace custom umbroute:statechange event with native…
JesmoDev 49470ec
simplify code and cleanup
JesmoDev d79fb6a
a11y improvements
iOvergaard a60bcf6
you can now navigate to anywhere from anywhere with pushState
JesmoDev 53f3900
access the "twoFactorView" from the backend
iOvergaard e2d7079
set the default implemented twoFactorView to NULL
iOvergaard 346605b
add initial logic to handle a custom mfa view
iOvergaard 4428848
Merge remote-tracking branch 'origin/v13/feature/new-login-screen' in…
iOvergaard 957258e
roll back custom pushState changes
JesmoDev b614764
add mocks for 2fa custom view
iOvergaard 5516f04
Merge remote-tracking branch 'origin/v13/feature/new-login-screen' in…
JesmoDev 02d635e
use router redirect
JesmoDev ed3f6df
re-enable click url change
JesmoDev af527ed
cleanup
JesmoDev 9d3b130
remove debug buttons
JesmoDev 6e661f0
Merge branch 'v13/feature/new-login-screen' of github.com:umbraco/umb…
iOvergaard 821698f
add unsafeHTML to localize element
iOvergaard 0bcf200
load mfa custom views
iOvergaard 8b3115a
load custom view
iOvergaard c3cedb8
improve external login custom views
iOvergaard 7439ad2
using optimisation
iOvergaard 44665cc
add current culture
iOvergaard 93e32f2
only show mfa page if 402 code has been encountered in same session
iOvergaard 937ece2
format
JesmoDev 7c4c8b3
remove unnesesary action
JesmoDev 4ea3aff
add new user invite password
JesmoDev dfe7e31
remove console log
JesmoDev e00ffeb
fix getting stuck at new password page if you've triggered custom val…
JesmoDev 17ada45
unify layouts
JesmoDev 9de790d
add styling to buttons in error layout
JesmoDev ce4558b
remove unused css
JesmoDev a54daf3
add error message to new password page
JesmoDev acb63d6
add error message to reset password
JesmoDev 60ff5bb
add error message to invite page
JesmoDev 006f0e5
fix invite page not being rendered
JesmoDev 20cf2eb
cleanup
JesmoDev 8345d90
add obsolete notice to PostSetInvitedUserPassword
iOvergaard 90abcba
add request model to set a new password for an invited user
iOvergaard 4a8d7e0
add new method to handle invited user password
iOvergaard 23f4f54
add get password config api call
JesmoDev 52640df
fix password config parameters and add invite call
JesmoDev 1cdb576
get invited user
JesmoDev 3c72ec6
get password config
JesmoDev 3525041
assign unique guid to login project
iOvergaard feaf83e
add userId to get password config and use the config as validation
JesmoDev c0a9934
fix
JesmoDev 01af3d9
add alerts
JesmoDev 52a455e
fix the new password layout
JesmoDev d38d211
auth redirects invite error to error page
JesmoDev 51a45b7
use password config on new password page
JesmoDev 73adb85
remove console log
JesmoDev 82dc421
move file and remove unused extension
JesmoDev c7229e0
make ts happy
JesmoDev ff5f54f
file structure
JesmoDev 5278e83
rename login-extern to external-login-provider
JesmoDev ce845f0
update element name
iOvergaard 86c9a58
update dependencies
iOvergaard f37c6a0
export custom-view.element.ts
iOvergaard 67c4db8
remove debug
iOvergaard 714a07c
use umb-custom-view to load custom views
iOvergaard 81a2ece
Merge remote-tracking branch 'origin/v13/dev' into v13/feature/new-lo…
iOvergaard 3c5e6d3
build types
iOvergaard eb4bd67
move @umbraco/uui to the login app and import from there in backoffice
iOvergaard b07115c
make the ui library and icon registry generally available as exports …
iOvergaard 31819b2
add mock handler for icons
iOvergaard 40b1212
cleanup package
iOvergaard 2906312
use uui for external login providers in the backoffice
iOvergaard bc2df2b
add imports and enable the backoffice icon registry globally
iOvergaard 889f8ce
disable shadowdom
iOvergaard 938ba33
default background image
iOvergaard cc38d7c
use undefined
iOvergaard 11e5bba
revert angular values
iOvergaard 3b51fae
remove legacy sys variables
iOvergaard d55e5fe
add logic to handle mfa in an overlay scenario without routing
iOvergaard b51017a
add new login screen to replace the overlay when logged in to the bac…
iOvergaard 5a986b1
update spec to work with locators
iOvergaard c77da35
cleanup of legacy context
iOvergaard 8a60ba6
ViewData is not always required
iOvergaard ae775b0
add method to solely return the default view of the backoffice to sim…
iOvergaard d7ac2de
add test for the login view
iOvergaard 557ebf8
cleanup usings
iOvergaard fb6dd61
Merge remote-tracking branch 'origin/v13/dev' into v13/feature/new-lo…
iOvergaard f67ea40
Apply suggestions from code review
iOvergaard 19a7a7f
remove 'remember me'
iOvergaard f395d5c
Merge remote-tracking branch 'origin/v13/dev' into v13/feature/new-lo…
iOvergaard 9b3f9bb
add more contrast to external login divider
iOvergaard a5bb285
update dependencies
iOvergaard e28376a
set "lang" attribute to lowercase
iOvergaard bf09982
remove default headline
iOvergaard 3e4bd49
localize the "Or" divider and add aria-hidden
iOvergaard 0b171ad
remove Umbraco reference from logo and add aria-hidden
iOvergaard 320906c
add aria-hidden to uui-icon inside external login buttons
iOvergaard 729816a
format code
iOvergaard 5d7f8b5
Merge remote-tracking branch 'origin/v13/dev' into v13/feature/new-lo…
iOvergaard c5352fe
update dependencies
iOvergaard b93dc91
update dependencies
iOvergaard ab5b68a
add translations to invite user page
iOvergaard b5baf78
use back to login button
iOvergaard 60abc04
update localization-context.ts to match api from old LocalizeService …
iOvergaard a70e46c
add tsc to watch
iOvergaard 4ef622e
formatting
iOvergaard cbc87bd
add missing localizations
iOvergaard 793a802
fix a11y issues with muted text
iOvergaard 9d4ddba
refresh current user after login
iOvergaard fd5ccde
remove unused variable
iOvergaard 391b2a1
add localization
iOvergaard ff04990
add localization for error messages
iOvergaard 031ad9f
remove unused var
iOvergaard 5b8772a
return user after login and set successful auth
iOvergaard f62bcb7
retry request queue after login
iOvergaard e0d27a2
add language keys for failed login
iOvergaard cc63e5c
add language keys for failed login
iOvergaard ab7d2fc
render the views without a router so that it works inside a modal in …
iOvergaard 587c034
add autocomplete to reset password fields
iOvergaard 24b38b8
add autocomplete to login screen
iOvergaard 0ed62e3
add generic error layout to new-password-page
iOvergaard 361093f
new-password-layout should be able to handle with and without username
iOvergaard d28dd56
update language keys
iOvergaard 2a95652
check for userId before trying to request invited user
iOvergaard 65635df
show error when no invited user is found
iOvergaard 0f5aea8
place back-to-login button on all error layouts
iOvergaard d794aed
Merge remote-tracking branch 'origin/v13/dev' into v13/feature/new-lo…
iOvergaard abb187e
update lockfile
iOvergaard File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
src/Umbraco.Cms.StaticAssets/umbraco/UmbracoLogin/Index.cshtml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| @using System.Globalization | ||
| @using Microsoft.AspNetCore.Routing | ||
| @using Microsoft.Extensions.Options; | ||
| @using Umbraco.Cms.Core | ||
| @using Umbraco.Cms.Core.Configuration.Models | ||
| @using Umbraco.Cms.Core.Hosting | ||
| @using Umbraco.Cms.Core.Mail | ||
| @using Umbraco.Cms.Web.BackOffice.Controllers | ||
| @using Umbraco.Cms.Web.BackOffice.Security | ||
| @using Umbraco.Extensions | ||
| @inject IOptions<ContentSettings> ContentSettings | ||
| @inject IOptions<SecuritySettings> SecuritySettings | ||
| @inject IEmailSender EmailSender | ||
| @inject IHostingEnvironment HostingEnvironment | ||
| @inject IOptions<GlobalSettings> GlobalSettings | ||
| @inject IBackOfficeExternalLoginProviders ExternalLogins | ||
| @inject LinkGenerator LinkGenerator | ||
| @{ | ||
| var backOfficePath = GlobalSettings.Value.GetBackOfficePath(HostingEnvironment); | ||
| var loginLogoImage = ContentSettings.Value.LoginLogoImage; | ||
| var loginBackgroundImage = ContentSettings.Value.LoginBackgroundImage; | ||
| var usernameIsEmail = SecuritySettings.Value.UsernameIsEmail; | ||
| var allowUserInvite = EmailSender.CanSendRequiredEmail(); | ||
| var allowPasswordReset = SecuritySettings.Value.AllowPasswordReset && EmailSender.CanSendRequiredEmail(); | ||
| var disableLocalLogin = ExternalLogins.HasDenyLocalLogin(); | ||
| var externalLoginsUrl = LinkGenerator.GetPathByAction(nameof(BackOfficeController.ExternalLogin), ControllerExtensions.GetControllerName<BackOfficeController>(), new { area = Constants.Web.Mvc.BackOfficeArea }); | ||
| var externalLoginProviders = await ExternalLogins.GetBackOfficeProvidersAsync(); | ||
| } | ||
| @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers | ||
|
|
||
| <!DOCTYPE html> | ||
| <html lang="@CultureInfo.CurrentCulture.Name.ToLowerInvariant()"> | ||
| <head> | ||
| <meta charset="UTF-8"/> | ||
| <base href="@backOfficePath.EnsureEndsWith('/')"/> | ||
| <link rel="icon" type="image/svg+xml" href="~/umbraco/login/favicon.svg"/> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | ||
| <title>Umbraco</title> | ||
| <link rel="stylesheet" href="~/umbraco/login/style.css" asp-append-version="true" /> | ||
| <script type="module" src="~/umbraco/login/external.js" asp-append-version="true"></script> | ||
| <script type="module" src="~/umbraco/login/index.js" asp-append-version="true"></script> | ||
| <style> | ||
| body { | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
| </style> | ||
| </head> | ||
|
|
||
| <body class="uui-font uui-text" style="margin: 0; padding: 0; overflow: hidden"> | ||
| <umb-backoffice-icon-registry> | ||
| <umb-auth | ||
| return-url="@backOfficePath" | ||
| logo-image="@loginLogoImage" | ||
| background-image="@loginBackgroundImage" | ||
| username-is-email="@usernameIsEmail" | ||
| allow-user-invite="@allowUserInvite" | ||
| allow-password-reset="@allowPasswordReset" | ||
| disable-local-login="@disableLocalLogin"> | ||
| @foreach (var provider in externalLoginProviders) | ||
| { | ||
| <umb-external-login-provider | ||
| slot="external" | ||
| display-name="@provider.AuthenticationScheme.DisplayName" | ||
| provider-name="@provider.ExternalLoginProvider.AuthenticationType" | ||
| icon="@provider.ExternalLoginProvider.Options.Icon" | ||
| external-login-url="@externalLoginsUrl" | ||
| button-look="@provider.ExternalLoginProvider.Options.ButtonLook.ToString().ToLowerInvariant()" | ||
| button-color="@provider.ExternalLoginProvider.Options.ButtonColor.ToString().ToLowerInvariant()" | ||
| custom-view="@provider.ExternalLoginProvider.Options.CustomBackOfficeView"> | ||
| </umb-external-login-provider> | ||
| } | ||
| </umb-auth> | ||
| </umb-backoffice-icon-registry> | ||
| </body> | ||
| </html> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| namespace Umbraco.Cms.Core.Models; | ||
|
|
||
| /// <summary> | ||
| /// Option to set the color of a uui-button element. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// See the UUI documentation for more details: https://uui.umbraco.com/?path=/story/uui-button--looks-and-colors. | ||
| /// </remarks> | ||
| public enum UuiButtonColor | ||
| { | ||
| Default, | ||
| Positive, | ||
| Warning, | ||
| Danger | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| namespace Umbraco.Cms.Core.Models; | ||
|
|
||
| /// <summary> | ||
| /// Option to set the look of a uui-button element. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// See the UUI documentation for more details: https://uui.umbraco.com/?path=/story/uui-button--looks-and-colors. | ||
| /// </remarks> | ||
| public enum UuiButtonLook | ||
| { | ||
| Default, | ||
| Primary, | ||
| Secondary, | ||
| Outline, | ||
| Placeholder | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.