Skip to content

Commit

Permalink
some small clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
pnzrr committed Aug 1, 2024
1 parent fcc596e commit c341c73
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This is a repo for code examples showing how to integrate Keycloak with various
| 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/) |
| 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/) |
| Sveltekit | [🧑‍💻📁](./frameworks/sveltekit/) | [👩‍💻🚀](https://phasetwo-sveltekit-example.vercel.app) | [👩‍🏫] (https://phasetwo.io/blog/instant-user-management-and-sso-for-sveltekit/) |
| Angular | [🧑‍💻📁](./frameworks/angular/) | [👩‍💻🚀](https://phasetwo-angular-example.vercel.app) | 👩‍🏫 |
| Angular | [🧑‍💻📁](./frameworks/angular/) | [👩‍💻🚀](https://phasetwo-angular-example.vercel.app) | [👩‍🏫](https://phasetwo.io/blog/instant-user-management-and-sso-for-angular/) |
| Django | [🧑‍💻📁](./frameworks/django/) | 👩‍💻⚒️ | [👩‍🏫](https://phasetwo.io/blog/secure-django/) |
| SpringBoot + Angular | [🧑‍💻📁](./frameworks/spring-boot-keycloak/) | 👩‍💻⚒️ | [👩‍🏫] https://phasetwo.io/blog/secure-spring-boot/ |

Expand Down
19 changes: 0 additions & 19 deletions frameworks/angular/src/app/auth.config.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
import { AuthConfig } from 'angular-oauth2-oidc';

export const authCodeFlowConfig: AuthConfig = {
// Url of the Identity Provider
issuer: 'https://app.phasetwo.io/auth/realms/p2examples',

// URL of the SPA to redirect the user to after login
redirectUri: window.location.origin + '/index.html',

// The SPA's id. The SPA is registerd with this id at the auth-server
// clientId: 'server.code',
clientId: 'angular',

// Just needed if your auth server demands a secret. In general, this
// is a sign that the auth server is not configured with SPAs in mind
// and it might not enforce further best practices vital for security
// such applications.
// dummyClientSecret: 'secret',

responseType: 'code',

// set the scope for the permissions the client should request
// The first four are defined by OIDC.
// Important: Request offline_access to get a refresh token
// The api scope is a usecase specific one
scope: 'openid profile email offline_access',

showDebugInformation: true,
};
5 changes: 1 addition & 4 deletions frameworks/angular/src/app/user/user.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import { filter } from 'rxjs/operators';
styleUrl: './user.component.css',
})
export class UserComponent {
isLoggedIn: boolean = false;
userInfo: any;

buttonClasses =
'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';

Expand All @@ -35,7 +32,7 @@ export class UserComponent {
}

signOut() {
this.oauthService.logOut();
return this.oauthService.logOut();
}

private decodeAndStringifyToken(token: any) {
Expand Down

0 comments on commit c341c73

Please sign in to comment.