Skip to content

Commit b06fb2c

Browse files
committed
Added redirect feature and return back to callback component
1 parent 21ff35b commit b06fb2c

13 files changed

+204
-560
lines changed

angular.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"src/assets"
2525
],
2626
"styles": [
27+
"./node_modules/bootstrap/dist/css/bootstrap.css",
2728
"src/styles.css"
2829
],
2930
"scripts": []
@@ -122,4 +123,4 @@
122123
}
123124
}},
124125
"defaultProject": "appauth-angular"
125-
}
126+
}

package-lock.json

Lines changed: 58 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
"@angular/platform-browser": "~8.2.14",
2020
"@angular/platform-browser-dynamic": "~8.2.14",
2121
"@angular/router": "~8.2.14",
22+
"@openid/appauth": "^1.2.6",
23+
"bootstrap": "^4.4.1",
2224
"rxjs": "~6.4.0",
2325
"tslib": "^1.10.0",
2426
"zone.js": "~0.9.1"

src/app/app-routing.module.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
import { NgModule } from '@angular/core';
2-
import { Routes, RouterModule } from '@angular/router';
1+
import {NgModule} from '@angular/core';
2+
import {Routes, RouterModule} from '@angular/router';
3+
import {HomeComponent} from './home/home.component';
4+
import {ProfileComponent} from './profile/profile.component';
5+
import {CallbackComponent} from './callback/callback.component';
36

47

5-
const routes: Routes = [];
8+
const routes: Routes = [
9+
{path: '', redirectTo: '/home', pathMatch: 'full'},
10+
{path: 'home', component: HomeComponent},
11+
{path: 'profile', component: ProfileComponent},
12+
{path: 'callback', component: CallbackComponent}
13+
];
614

715
@NgModule({
816
imports: [RouterModule.forRoot(routes)],
917
exports: [RouterModule]
1018
})
11-
export class AppRoutingModule { }
19+
export class AppRoutingModule {
20+
}

0 commit comments

Comments
 (0)