File tree Expand file tree Collapse file tree 3 files changed +2
-24
lines changed
frameworks/angular/src/app Expand file tree Collapse file tree 3 files changed +2
-24
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ This is a repo for code examples showing how to integrate Keycloak with various
13
13
| Nuxt (keycloak-js) | [ 🧑💻📁] ( ./frameworks/nuxt/keycloak-js/ ) | [ 👩💻🚀] ( https://phasetwo-nuxt-keycloakjs-example.vercel.app/ ) | [ 👩🏫] (https://phasetwo.io/blog/instant-user-managemenet-and-sso-for-nuxt/) |
14
14
| Nuxt (oidc-client-ts) | [ 🧑💻📁] ( ./frameworks/nuxt/oidc-client-ts/ ) | [ 👩💻🚀] ( https://phasetwo-nuxt-oidc-example.vercel.app/ ) | [ 👩🏫] (https://phasetwo.io/blog/instant-user-managemenet-and-sso-for-nuxt/) |
15
15
| Sveltekit | [ 🧑💻📁] ( ./frameworks/sveltekit/ ) | [ 👩💻🚀] ( https://phasetwo-sveltekit-example.vercel.app ) | [ 👩🏫] (https://phasetwo.io/blog/instant-user-management-and-sso-for-sveltekit/) |
16
- | Angular | [ 🧑💻📁] ( ./frameworks/angular/ ) | [ 👩💻🚀] ( https://phasetwo-angular-example.vercel.app ) | 👩🏫 |
16
+ | Angular | [ 🧑💻📁] ( ./frameworks/angular/ ) | [ 👩💻🚀] ( https://phasetwo-angular-example.vercel.app ) | [ 👩🏫] ( https://phasetwo.io/blog/instant-user-management-and-sso-for-angular/ ) |
17
17
| Django | [ 🧑💻📁] ( ./frameworks/django/ ) | 👩💻⚒️ | [ 👩🏫] ( https://phasetwo.io/blog/secure-django/ ) |
18
18
| SpringBoot + Angular | [ 🧑💻📁] ( ./frameworks/spring-boot-keycloak/ ) | 👩💻⚒️ | [ 👩🏫] https://phasetwo.io/blog/secure-spring-boot/ |
19
19
Original file line number Diff line number Diff line change 1
1
import { AuthConfig } from 'angular-oauth2-oidc' ;
2
2
3
3
export const authCodeFlowConfig : AuthConfig = {
4
- // Url of the Identity Provider
5
4
issuer : 'https://app.phasetwo.io/auth/realms/p2examples' ,
6
-
7
- // URL of the SPA to redirect the user to after login
8
5
redirectUri : window . location . origin + '/index.html' ,
9
-
10
- // The SPA's id. The SPA is registerd with this id at the auth-server
11
- // clientId: 'server.code',
12
6
clientId : 'angular' ,
13
-
14
- // Just needed if your auth server demands a secret. In general, this
15
- // is a sign that the auth server is not configured with SPAs in mind
16
- // and it might not enforce further best practices vital for security
17
- // such applications.
18
- // dummyClientSecret: 'secret',
19
-
20
7
responseType : 'code' ,
21
-
22
- // set the scope for the permissions the client should request
23
- // The first four are defined by OIDC.
24
- // Important: Request offline_access to get a refresh token
25
- // The api scope is a usecase specific one
26
8
scope : 'openid profile email offline_access' ,
27
-
28
9
showDebugInformation : true ,
29
10
} ;
Original file line number Diff line number Diff line change @@ -13,9 +13,6 @@ import { filter } from 'rxjs/operators';
13
13
styleUrl : './user.component.css' ,
14
14
} )
15
15
export class UserComponent {
16
- isLoggedIn : boolean = false ;
17
- userInfo : any ;
18
-
19
16
buttonClasses =
20
17
'rounded-md bg-indigo-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600' ;
21
18
@@ -35,7 +32,7 @@ export class UserComponent {
35
32
}
36
33
37
34
signOut ( ) {
38
- this . oauthService . logOut ( ) ;
35
+ return this . oauthService . logOut ( ) ;
39
36
}
40
37
41
38
private decodeAndStringifyToken ( token : any ) {
You can’t perform that action at this time.
0 commit comments