Skip to content

Commit c341c73

Browse files
committed
some small clean up
1 parent fcc596e commit c341c73

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This is a repo for code examples showing how to integrate Keycloak with various
1313
| 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/) |
1414
| 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/) |
1515
| 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/) |
1717
| Django | [🧑‍💻📁](./frameworks/django/) | 👩‍💻⚒️ | [👩‍🏫](https://phasetwo.io/blog/secure-django/) |
1818
| SpringBoot + Angular | [🧑‍💻📁](./frameworks/spring-boot-keycloak/) | 👩‍💻⚒️ | [👩‍🏫] https://phasetwo.io/blog/secure-spring-boot/ |
1919

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
11
import { AuthConfig } from 'angular-oauth2-oidc';
22

33
export const authCodeFlowConfig: AuthConfig = {
4-
// Url of the Identity Provider
54
issuer: 'https://app.phasetwo.io/auth/realms/p2examples',
6-
7-
// URL of the SPA to redirect the user to after login
85
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',
126
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-
207
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
268
scope: 'openid profile email offline_access',
27-
289
showDebugInformation: true,
2910
};

frameworks/angular/src/app/user/user.component.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ import { filter } from 'rxjs/operators';
1313
styleUrl: './user.component.css',
1414
})
1515
export class UserComponent {
16-
isLoggedIn: boolean = false;
17-
userInfo: any;
18-
1916
buttonClasses =
2017
'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';
2118

@@ -35,7 +32,7 @@ export class UserComponent {
3532
}
3633

3734
signOut() {
38-
this.oauthService.logOut();
35+
return this.oauthService.logOut();
3936
}
4037

4138
private decodeAndStringifyToken(token: any) {

0 commit comments

Comments
 (0)