+
+
diff --git a/src/core/components/password-modal/password-modal.module.ts b/src/core/components/password-modal/password-modal.module.ts
new file mode 100644
index 000000000..77018a384
--- /dev/null
+++ b/src/core/components/password-modal/password-modal.module.ts
@@ -0,0 +1,29 @@
+// (C) Copyright 2015 Moodle Pty Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { NgModule } from '@angular/core';
+import { CorePasswordModalComponent } from './password-modal';
+import { CoreSharedModule } from '@/core/shared.module';
+
+export { CorePasswordModalComponent };
+
+@NgModule({
+ declarations: [
+ CorePasswordModalComponent,
+ ],
+ imports: [
+ CoreSharedModule,
+ ],
+})
+export class CorePasswordModalModule {}
diff --git a/src/core/components/password-modal/password-modal.ts b/src/core/components/password-modal/password-modal.ts
new file mode 100644
index 000000000..dd7e43cd7
--- /dev/null
+++ b/src/core/components/password-modal/password-modal.ts
@@ -0,0 +1,111 @@
+// (C) Copyright 2015 Moodle Pty Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { Component, ViewChild, ElementRef, Input } from '@angular/core';
+
+import { CoreSites } from '@services/sites';
+import { CoreForms } from '@singletons/form';
+import { ModalController } from '@singletons';
+import { CoreDomUtils } from '@services/utils/dom';
+
+/**
+ * Modal that asks the password.
+ *
+ * WARNING: This component is not loaded with components.module.ts.
+ */
+@Component({
+ selector: 'core-password-modal',
+ templateUrl: 'password-modal.html',
+})
+export class CorePasswordModalComponent {
+
+ @ViewChild('passwordForm') formElement?: ElementRef;
+
+ @Input() title = 'core.login.password'; // Translatable string to be shown on modal title.
+ @Input() placeholder = 'core.login.password'; // Translatable string to be shown on password input as placeholder.
+ @Input() submit = 'core.submit'; // Translatable string to be shown on submit button.
+ @Input() validator?: (password?: string) => Promise