This repository was archived by the owner on Nov 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1- import { UMB_AUTH_CONTEXT , UMB_MODAL_APP_AUTH , type UmbUserLoginState } from '@umbraco-cms/backoffice/auth' ;
1+ import {
2+ UMB_AUTH_CONTEXT ,
3+ UMB_MODAL_APP_AUTH ,
4+ UMB_STORAGE_REDIRECT_URL ,
5+ type UmbUserLoginState ,
6+ } from '@umbraco-cms/backoffice/auth' ;
27import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api' ;
38import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api' ;
49import { firstValueFrom } from '@umbraco-cms/backoffice/external/rxjs' ;
@@ -65,6 +70,9 @@ export class UmbAppAuthController extends UmbControllerBase {
6570 throw new Error ( '[Fatal] Auth context is not available' ) ;
6671 }
6772
73+ // Save the current state
74+ sessionStorage . setItem ( UMB_STORAGE_REDIRECT_URL , window . location . href ) ;
75+
6876 // Figure out which providers are available
6977 const availableProviders = await firstValueFrom ( this . #authContext. getAuthProviders ( umbExtensionsRegistry ) ) ;
7078
Original file line number Diff line number Diff line change 11import type { UmbBackofficeExtensionRegistry , ManifestAuthProvider } from '../extension-registry/index.js' ;
22import { UmbAuthFlow } from './auth-flow.js' ;
3- import { UMB_AUTH_CONTEXT , UMB_STORAGE_REDIRECT_URL , UMB_STORAGE_TOKEN_RESPONSE_NAME } from './auth.context.token.js' ;
3+ import { UMB_AUTH_CONTEXT , UMB_STORAGE_TOKEN_RESPONSE_NAME } from './auth.context.token.js' ;
44import type { UmbOpenApiConfiguration } from './models/openApiConfiguration.js' ;
55import { OpenAPI } from '@umbraco-cms/backoffice/external/backend-api' ;
66import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api' ;
@@ -106,9 +106,6 @@ export class UmbAuthContext extends UmbContextBase<UmbAuthContext> {
106106 ) {
107107 const redirectUrl = await this . #authFlow. makeAuthorizationRequest ( identityProvider , usernameHint ) ;
108108 if ( redirect ) {
109- // Save the current state
110- sessionStorage . setItem ( UMB_STORAGE_REDIRECT_URL , window . location . href ) ;
111-
112109 location . href = redirectUrl ;
113110 return ;
114111 }
You can’t perform that action at this time.
0 commit comments