mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52:55 +00:00
feat: add auth support (default and paia)
This commit is contained in:
committed by
Jovan Krunić
parent
046a95ba1d
commit
b5f239ea4e
26
src/app/modules/auth/end-session/end-session.module.ts
Normal file
26
src/app/modules/auth/end-session/end-session.module.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {Routes, RouterModule} from '@angular/router';
|
||||
|
||||
import {IonicModule} from '@ionic/angular';
|
||||
|
||||
import {EndSessionPageComponent} from './page/end-session-page.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'logout',
|
||||
component: EndSessionPageComponent,
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
],
|
||||
declarations: [EndSessionPageComponent],
|
||||
})
|
||||
export class EndSessionPageModule {}
|
||||
@@ -0,0 +1 @@
|
||||
<p>Signing out...</p>
|
||||
@@ -0,0 +1,20 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {NavController} from '@ionic/angular';
|
||||
import {DefaultAuthService} from '../../default-auth.service';
|
||||
|
||||
@Component({
|
||||
selector: 'end-session',
|
||||
templateUrl: './end-session-page.component.html',
|
||||
styleUrls: ['./end-session-page.component.scss'],
|
||||
})
|
||||
export class EndSessionPageComponent implements OnInit {
|
||||
constructor(
|
||||
private auth: DefaultAuthService,
|
||||
private navCtrl: NavController,
|
||||
) {}
|
||||
|
||||
async ngOnInit() {
|
||||
this.auth.endSessionCallback();
|
||||
await this.navCtrl.navigateRoot('profile');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user