Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/proxy-auth/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ export class AppComponent extends BaseComponent implements OnInit, OnDestroy {
if (!environment.production) {
const sendOTPConfig = {
// referenceId: '4512365m176216342869087ae458e09',
type: 'organization-details',
// type: 'organization-details',
// loginRedirectUrl: 'https://www.google.com',
// showCompanyDetails: false,
authToken:
'ZVlWU2U4cnlOVUh5M1lYcTZLUUVaczZGdFlHN2lKOXNIU24rTWx3WWpnQzE5YXJVaTF0R215UkEvNGpIS2tJVC83Q01EQlk2QWZ6Z1UxYlQvZCtSeThxdDdiUHVuNm9RbVhPNDVnTFFUN3dKZkRIT294a3BvWFFNSGIxUFV6Wk5yZkpmYXk0MzVmUzlrTXp1bkRYTkRUdzBKMW9yRi8vTDgrak9ESzlKblVXU1hvWCtHSytkaW9nemYxTTFwNEVPSThlNk9ZRXd0YTJUanJqRk1sZUdGUT09',
'ZGlYV0Z4ekRleUQwZEhXR2JvRllKaWh6cmhhb2hhTnhTMGdDdHlpa2ZaOU9LcGh5M3puLzZ6QTVRb3pGdGNPU0xlSC9SQjI3ckNweWk5cWg1aytpOVRTVmtUWXFRQW5rWEZ0c21KeEN6c0FmK1d5bWQxUk9lZHM4anlHSDI5Q3dxL0o3V0h6Yk9kMDBSVE5pc1FPekJkQVg3QXZ4K2xFbUViUGdhQ0Z6d3hGNXQreEN2dytUQW9GOEdseFFBU3FaNXYzbFVUalJDRitqc0EvQVduQUkrUT09',
// type: 'user-management',
isHidden: true,
theme: 'dark',
// isHidden: true,
// theme: 'dark',
// isPreview: true,
isLogin: true,
// isLogin: true,
target: '_self',
success: (data) => {
console.log('success response', data);
Expand Down
18 changes: 18 additions & 0 deletions apps/proxy-auth/src/app/shadow-dom-overlay-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,24 @@ export class ShadowDomOverlayContainer extends OverlayContainer {
super(document, _platform);
}

/**
* Before returning the cached container, check whether it is still
* connected to the live document. This can become false when the client
* application does a SPA navigation that removes the <proxy-auth> custom
* element (and therefore its shadow root) from the DOM. A new
* <proxy-auth> element is created by initVerification() on the next
* navigation, but the CDK base class would keep returning the old,
* detached container — causing MatDialog / MatSnackBar to render into an
* invisible node. Clearing _containerElement forces _createContainer()
* to run again and attach the overlay to the new shadow root.
*/
override getContainerElement(): HTMLElement {
if (this._containerElement && !this._containerElement.isConnected) {
this._containerElement = null;
}
return super.getContainerElement();
}

protected override _createContainer(): void {
if (!this._platform.isBrowser) {
return;
Expand Down
Loading