Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit dcaeabb

Browse files
committed
[Release] v0.1.9
* improve security * inform about use of authguard * update version number Merge tag 'v0.1.9' into develop [Release] v0.1.9 * improve security * inform about use of authguard * update version number
2 parents 50a4d17 + 7154439 commit dcaeabb

File tree

7 files changed

+12
-13
lines changed

7 files changed

+12
-13
lines changed

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cryptr-angular",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

projects/cryptr/cryptr-angular/package-lock.json

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

projects/cryptr/cryptr-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cryptr/cryptr-angular",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"description": "Cryptr SDK for Angular SPA",
55
"keywords": [
66
"cryptr",

projects/cryptr/cryptr-angular/src/lib/auth.client.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@ export class CryptrClientFactory {
1212
'Configuration must be specified either through AuthModule.forRoot or through AuthClientConfig.set'
1313
);
1414
} else {
15-
console.log(config);
16-
const { default_redirect_uri, httpInterceptor: { apiRequestsToSecure } } = config;
15+
const { httpInterceptor: { apiRequestsToSecure } } = config;
1716
if (apiRequestsToSecure === undefined || apiRequestsToSecure.length === 0) {
1817
throw new Error(
1918
'You must specify at least one item in config.httpInterceptor.apiRequestsToSecure . Mainly use your Resource server url'
2019
);
2120
}
22-
console.warn(`The path ${default_redirect_uri} have to be decorated with 'canActivate: [AuthGuard]' options`);
21+
console.warn('Secured paths have to be decorated with \'canActivate: [AuthGuard]\' options');
2322
}
24-
const client = new CryptrSpa.client(config);
25-
return client;
23+
return new CryptrSpa.client(config);
2624
} catch (error) {
2725
console.error('authclient error');
2826
console.error(error);

projects/cryptr/cryptr-angular/src/lib/auth.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ export class AuthService implements OnDestroy {
9898
if (this.authenticated$.value) {
9999
this.setUser(this.getClientUser());
100100
} else {
101-
alert('failure, please check Javascript console');
101+
console.error('handling tokens failed');
102+
console.error(tokens);
102103
}
103104
return this.authenticated$.value;
104105
}

projects/playground/src/environments/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const environment = {
88
cryptrConfig: {
99
audience: 'http://localhost:4200',
1010
tenant_domain: 'shark-academy',
11-
client_id: '724b141a-e1eb-4f5b-bfca-22eca8ae3cc4',
11+
client_id: '79742198-b3d6-4565-bca2-276f63162129',
1212
default_redirect_uri: 'http://localhost:4200/',
1313
// region: 'us',
1414
cryptr_base_url: 'http://localhost:4000',

0 commit comments

Comments
 (0)