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' ;
2
7
import { UmbControllerBase } from '@umbraco-cms/backoffice/class-api' ;
3
8
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api' ;
4
9
import { firstValueFrom } from '@umbraco-cms/backoffice/external/rxjs' ;
@@ -65,6 +70,9 @@ export class UmbAppAuthController extends UmbControllerBase {
65
70
throw new Error ( '[Fatal] Auth context is not available' ) ;
66
71
}
67
72
73
+ // Save the current state
74
+ sessionStorage . setItem ( UMB_STORAGE_REDIRECT_URL , window . location . href ) ;
75
+
68
76
// Figure out which providers are available
69
77
const availableProviders = await firstValueFrom ( this . #authContext. getAuthProviders ( umbExtensionsRegistry ) ) ;
70
78
Original file line number Diff line number Diff line change 1
1
import type { UmbBackofficeExtensionRegistry , ManifestAuthProvider } from '../extension-registry/index.js' ;
2
2
import { 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' ;
4
4
import type { UmbOpenApiConfiguration } from './models/openApiConfiguration.js' ;
5
5
import { OpenAPI } from '@umbraco-cms/backoffice/external/backend-api' ;
6
6
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api' ;
@@ -106,9 +106,6 @@ export class UmbAuthContext extends UmbContextBase<UmbAuthContext> {
106
106
) {
107
107
const redirectUrl = await this . #authFlow. makeAuthorizationRequest ( identityProvider , usernameHint ) ;
108
108
if ( redirect ) {
109
- // Save the current state
110
- sessionStorage . setItem ( UMB_STORAGE_REDIRECT_URL , window . location . href ) ;
111
-
112
109
location . href = redirectUrl ;
113
110
return ;
114
111
}
You can’t perform that action at this time.
0 commit comments