@fusionauth/angular-sdk 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/fesm2022/fusionauth-angular-sdk.mjs +77 -41
- package/fesm2022/fusionauth-angular-sdk.mjs.map +1 -1
- package/package.json +16 -8
- package/types/fusionauth-angular-sdk.d.ts +183 -0
- package/esm2022/fusionauth-angular-sdk.mjs +0 -5
- package/esm2022/lib/SSRCookieAdapter.mjs +0 -23
- package/esm2022/lib/components/fusionauth-account.button/fusion-auth-account-button.component.mjs +0 -18
- package/esm2022/lib/components/fusionauth-login.button/fusion-auth-login-button.component.mjs +0 -20
- package/esm2022/lib/components/fusionauth-logout.button/fusion-auth-logout-button.component.mjs +0 -18
- package/esm2022/lib/components/fusionauth-register.button/fusion-auth-register-button.component.mjs +0 -20
- package/esm2022/lib/fusion-auth.module.mjs +0 -47
- package/esm2022/lib/fusion-auth.service.mjs +0 -118
- package/esm2022/lib/injectionToken.mjs +0 -3
- package/esm2022/lib/types.mjs +0 -2
- package/esm2022/public-api.mjs +0 -11
- package/esm2022/sdkcore/CookieHelpers/CookieHelpers.mjs +0 -34
- package/esm2022/sdkcore/CookieHelpers/index.mjs +0 -2
- package/esm2022/sdkcore/RedirectHelper/RedirectHelper.mjs +0 -47
- package/esm2022/sdkcore/RedirectHelper/index.mjs +0 -2
- package/esm2022/sdkcore/SDKConfig/SDKConfig.mjs +0 -2
- package/esm2022/sdkcore/SDKConfig/index.mjs +0 -2
- package/esm2022/sdkcore/SDKContext/SDKContext.mjs +0 -2
- package/esm2022/sdkcore/SDKContext/index.mjs +0 -2
- package/esm2022/sdkcore/SDKCore/SDKCore.mjs +0 -110
- package/esm2022/sdkcore/SDKCore/index.mjs +0 -2
- package/esm2022/sdkcore/UrlHelper/UrlHelper.mjs +0 -69
- package/esm2022/sdkcore/UrlHelper/UrlHelperTypes.mjs +0 -2
- package/esm2022/sdkcore/UrlHelper/index.mjs +0 -3
- package/esm2022/sdkcore/index.mjs +0 -5
- package/esm2022/sdkcore/testUtils/index.mjs +0 -3
- package/esm2022/sdkcore/testUtils/mockLoggedIn.mjs +0 -13
- package/esm2022/sdkcore/testUtils/mockWindowLocation.mjs +0 -10
- package/index.d.ts +0 -5
- package/lib/SSRCookieAdapter.d.ts +0 -7
- package/lib/components/fusionauth-account.button/fusion-auth-account-button.component.d.ts +0 -9
- package/lib/components/fusionauth-login.button/fusion-auth-login-button.component.d.ts +0 -10
- package/lib/components/fusionauth-logout.button/fusion-auth-logout-button.component.d.ts +0 -9
- package/lib/components/fusionauth-register.button/fusion-auth-register-button.component.d.ts +0 -10
- package/lib/fusion-auth.module.d.ts +0 -13
- package/lib/fusion-auth.service.d.ts +0 -59
- package/lib/injectionToken.d.ts +0 -3
- package/lib/types.d.ts +0 -78
- package/public-api.d.ts +0 -7
- package/sdkcore/CookieHelpers/CookieHelpers.d.ts +0 -11
- package/sdkcore/CookieHelpers/index.d.ts +0 -1
- package/sdkcore/RedirectHelper/RedirectHelper.d.ts +0 -10
- package/sdkcore/RedirectHelper/index.d.ts +0 -1
- package/sdkcore/SDKConfig/SDKConfig.d.ts +0 -79
- package/sdkcore/SDKConfig/index.d.ts +0 -1
- package/sdkcore/SDKContext/SDKContext.d.ts +0 -69
- package/sdkcore/SDKContext/index.d.ts +0 -1
- package/sdkcore/SDKCore/SDKCore.d.ts +0 -28
- package/sdkcore/SDKCore/index.d.ts +0 -1
- package/sdkcore/UrlHelper/UrlHelper.d.ts +0 -23
- package/sdkcore/UrlHelper/UrlHelperTypes.d.ts +0 -11
- package/sdkcore/UrlHelper/index.d.ts +0 -2
- package/sdkcore/index.d.ts +0 -5
- package/sdkcore/testUtils/index.d.ts +0 -2
- package/sdkcore/testUtils/mockLoggedIn.d.ts +0 -5
- package/sdkcore/testUtils/mockWindowLocation.d.ts +0 -18
package/README.md
CHANGED
|
@@ -4,6 +4,7 @@ An SDK for using FusionAuth in Angular applications.
|
|
|
4
4
|
|
|
5
5
|
- [Overview](#overview)
|
|
6
6
|
- [Getting Started](#getting-started)
|
|
7
|
+
- [Quickstart](#quickstart)
|
|
7
8
|
- [Installation](#installation)
|
|
8
9
|
- [Usage](#usage)
|
|
9
10
|
- [FusionAuthService](#fusionauthservice)
|
|
@@ -11,7 +12,6 @@ An SDK for using FusionAuth in Angular applications.
|
|
|
11
12
|
- [State Parameter](#state-parameter)
|
|
12
13
|
- [SSR](#ssr)
|
|
13
14
|
- [Known issues](#known-issues)
|
|
14
|
-
- [Quickstart](#quickstart)
|
|
15
15
|
- [Documentation](#documentation)
|
|
16
16
|
- [Releases](#releases)
|
|
17
17
|
|
|
@@ -57,6 +57,12 @@ compliant identity server.
|
|
|
57
57
|
|
|
58
58
|
## Getting Started
|
|
59
59
|
|
|
60
|
+
If you are new to Angular development, you may want to start with the Quickstart guide. If you are already familiar with Angular development, skip to the Installation section.
|
|
61
|
+
|
|
62
|
+
### Quickstart
|
|
63
|
+
|
|
64
|
+
See the [FusionAuth Angular Quickstart](https://fusionauth.io/docs/quickstarts/quickstart-javascript-angular-web) for a full tutorial on using FusionAuth and Angular.
|
|
65
|
+
|
|
60
66
|
### Installation
|
|
61
67
|
|
|
62
68
|
NPM:
|
|
@@ -183,10 +189,6 @@ The SDK supports Angular applications using SSR. No additional configuration is
|
|
|
183
189
|
|
|
184
190
|
None.
|
|
185
191
|
|
|
186
|
-
## Quickstart
|
|
187
|
-
|
|
188
|
-
See the [FusionAuth Angular Quickstart](https://fusionauth.io/docs/quickstarts/quickstart-javascript-angular-web) for a full tutorial on using FusionAuth and Angular.
|
|
189
|
-
|
|
190
192
|
## Documentation
|
|
191
193
|
|
|
192
194
|
[Full library documentation](https://github.com/FusionAuth/fusionauth-javascript-sdk/tree/main/packages/sdk-angular/docs)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, PLATFORM_ID, Injectable,
|
|
2
|
+
import { InjectionToken, PLATFORM_ID, Inject, Injectable, Input, Component, NgModule } from '@angular/core';
|
|
3
3
|
import { isPlatformBrowser } from '@angular/common';
|
|
4
4
|
import { BehaviorSubject, Observable, catchError } from 'rxjs';
|
|
5
5
|
|
|
@@ -10,6 +10,7 @@ class UrlHelper {
|
|
|
10
10
|
this.clientId = config.clientId;
|
|
11
11
|
this.redirectUri = config.redirectUri;
|
|
12
12
|
this.scope = config.scope;
|
|
13
|
+
this.authParams = config.authParams;
|
|
13
14
|
this.postLogoutRedirectUri = config.postLogoutRedirectUri;
|
|
14
15
|
this.mePath = config.mePath ?? '/app/me/';
|
|
15
16
|
this.loginPath = config.loginPath ?? '/app/login/';
|
|
@@ -25,6 +26,7 @@ class UrlHelper {
|
|
|
25
26
|
client_id: this.clientId,
|
|
26
27
|
redirect_uri: this.redirectUri,
|
|
27
28
|
scope: this.scope,
|
|
29
|
+
authParams: this.authParams,
|
|
28
30
|
state,
|
|
29
31
|
});
|
|
30
32
|
}
|
|
@@ -33,6 +35,7 @@ class UrlHelper {
|
|
|
33
35
|
client_id: this.clientId,
|
|
34
36
|
redirect_uri: this.redirectUri,
|
|
35
37
|
scope: this.scope,
|
|
38
|
+
authParams: this.authParams,
|
|
36
39
|
state,
|
|
37
40
|
});
|
|
38
41
|
}
|
|
@@ -63,12 +66,21 @@ class UrlHelper {
|
|
|
63
66
|
}
|
|
64
67
|
generateURLSearchParams(params) {
|
|
65
68
|
const urlSearchParams = new URLSearchParams();
|
|
69
|
+
this.appendParams(params, urlSearchParams);
|
|
70
|
+
return urlSearchParams;
|
|
71
|
+
}
|
|
72
|
+
appendParams(params, // or a more specific type if known
|
|
73
|
+
urlSearchParams) {
|
|
66
74
|
Object.entries(params).forEach(([key, value]) => {
|
|
67
|
-
if (value) {
|
|
68
|
-
|
|
75
|
+
if ((value && typeof value === 'object') || Array.isArray(value)) {
|
|
76
|
+
// Recursively handle nested objects
|
|
77
|
+
this.appendParams(value, urlSearchParams);
|
|
78
|
+
}
|
|
79
|
+
else if (value !== undefined && value !== null) {
|
|
80
|
+
// Append primitive values
|
|
81
|
+
urlSearchParams.append(key, String(value));
|
|
69
82
|
}
|
|
70
83
|
});
|
|
71
|
-
return urlSearchParams;
|
|
72
84
|
}
|
|
73
85
|
}
|
|
74
86
|
|
|
@@ -97,20 +109,21 @@ class RedirectHelper {
|
|
|
97
109
|
this.storage.setItem(this.REDIRECT_VALUE, valueForStorage);
|
|
98
110
|
}
|
|
99
111
|
handlePostRedirect(callback) {
|
|
100
|
-
const
|
|
101
|
-
|
|
112
|
+
const didRedirect = Boolean(this.storage.getItem(this.REDIRECT_VALUE));
|
|
113
|
+
if (!didRedirect) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
const state = this.state;
|
|
117
|
+
callback?.(state);
|
|
102
118
|
this.storage.removeItem(this.REDIRECT_VALUE);
|
|
103
119
|
}
|
|
104
|
-
get
|
|
105
|
-
return Boolean(this.storage.getItem(this.REDIRECT_VALUE));
|
|
106
|
-
}
|
|
107
|
-
get stateValue() {
|
|
120
|
+
get state() {
|
|
108
121
|
const redirectValue = this.storage.getItem(this.REDIRECT_VALUE);
|
|
109
122
|
if (!redirectValue) {
|
|
110
|
-
return
|
|
123
|
+
return;
|
|
111
124
|
}
|
|
112
125
|
const [, ...stateValue] = redirectValue.split(':');
|
|
113
|
-
return stateValue.join(':');
|
|
126
|
+
return stateValue.join(':') || undefined;
|
|
114
127
|
}
|
|
115
128
|
generateRandomString() {
|
|
116
129
|
const array = new Uint32Array(56 / 2);
|
|
@@ -157,12 +170,14 @@ function toMilliseconds(seconds) {
|
|
|
157
170
|
class SDKCore {
|
|
158
171
|
constructor(config) {
|
|
159
172
|
this.redirectHelper = new RedirectHelper();
|
|
173
|
+
this.isDisposed = false;
|
|
160
174
|
this.config = config;
|
|
161
175
|
this.urlHelper = new UrlHelper({
|
|
162
176
|
serverUrl: config.serverUrl,
|
|
163
177
|
clientId: config.clientId,
|
|
164
178
|
redirectUri: config.redirectUri,
|
|
165
179
|
scope: config.scope,
|
|
180
|
+
authParams: config.authParams,
|
|
166
181
|
mePath: config.mePath,
|
|
167
182
|
loginPath: config.loginPath,
|
|
168
183
|
registerPath: config.registerPath,
|
|
@@ -172,6 +187,11 @@ class SDKCore {
|
|
|
172
187
|
});
|
|
173
188
|
this.scheduleTokenExpiration();
|
|
174
189
|
}
|
|
190
|
+
dispose() {
|
|
191
|
+
clearTimeout(this.tokenExpirationTimeout);
|
|
192
|
+
clearTimeout(this.refreshTokenTimeout);
|
|
193
|
+
this.isDisposed = true;
|
|
194
|
+
}
|
|
175
195
|
startLogin(state) {
|
|
176
196
|
this.redirectHelper.handlePreRedirect(state);
|
|
177
197
|
window.location.assign(this.urlHelper.getLoginUrl(state));
|
|
@@ -205,9 +225,12 @@ class SDKCore {
|
|
|
205
225
|
},
|
|
206
226
|
});
|
|
207
227
|
if (!(response.status >= 200 && response.status < 300)) {
|
|
208
|
-
const
|
|
209
|
-
|
|
210
|
-
|
|
228
|
+
const errorDetails = {
|
|
229
|
+
status: response.status,
|
|
230
|
+
details: (await response?.text()) ||
|
|
231
|
+
'Failed to refresh fusionauth access token',
|
|
232
|
+
};
|
|
233
|
+
throw new Error(JSON.stringify(errorDetails));
|
|
211
234
|
}
|
|
212
235
|
// a successful request means that app_exp was bumped into the future.
|
|
213
236
|
// reschedule the access token expiration event.
|
|
@@ -215,7 +238,10 @@ class SDKCore {
|
|
|
215
238
|
return response;
|
|
216
239
|
}
|
|
217
240
|
initAutoRefresh() {
|
|
218
|
-
|
|
241
|
+
// Clear any pending refresh so repeated calls (e.g. a reactive framework
|
|
242
|
+
// re-running an effect) doesn't leave duplicate timers running.
|
|
243
|
+
clearTimeout(this.refreshTokenTimeout);
|
|
244
|
+
if (!this.isLoggedIn || this.isDisposed) {
|
|
219
245
|
return;
|
|
220
246
|
}
|
|
221
247
|
const secondsBeforeRefresh = this.config.autoRefreshSecondsBeforeExpiry ?? 10;
|
|
@@ -223,7 +249,7 @@ class SDKCore {
|
|
|
223
249
|
const now = new Date().getTime();
|
|
224
250
|
const refreshTime = this.at_exp - millisecondsBeforeRefresh;
|
|
225
251
|
const timeTillRefresh = Math.max(refreshTime - now, 0);
|
|
226
|
-
|
|
252
|
+
this.refreshTokenTimeout = setTimeout(async () => {
|
|
227
253
|
try {
|
|
228
254
|
await this.refreshToken();
|
|
229
255
|
this.initAutoRefresh();
|
|
@@ -232,9 +258,19 @@ class SDKCore {
|
|
|
232
258
|
this.config.onAutoRefreshFailure?.(error);
|
|
233
259
|
}
|
|
234
260
|
}, timeTillRefresh);
|
|
261
|
+
return this.refreshTokenTimeout;
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Cancels a pending automatic token refresh without disposing the core.
|
|
265
|
+
* Unlike {@link dispose}, the core remains usable and auto refresh can be
|
|
266
|
+
* restarted via {@link initAutoRefresh}. This makes it safe to stop/start
|
|
267
|
+
* across React StrictMode's mount → unmount → remount cycle.
|
|
268
|
+
*/
|
|
269
|
+
stopAutoRefresh() {
|
|
270
|
+
clearTimeout(this.refreshTokenTimeout);
|
|
235
271
|
}
|
|
236
272
|
handlePostRedirect(callback) {
|
|
237
|
-
if (this.isLoggedIn
|
|
273
|
+
if (this.isLoggedIn) {
|
|
238
274
|
this.redirectHelper.handlePostRedirect(callback);
|
|
239
275
|
}
|
|
240
276
|
}
|
|
@@ -401,10 +437,10 @@ class FusionAuthService {
|
|
|
401
437
|
manageAccount() {
|
|
402
438
|
this.core.manageAccount();
|
|
403
439
|
}
|
|
404
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
405
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
440
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthService, deps: [{ token: FUSIONAUTH_SERVICE_CONFIG }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
441
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthService, providedIn: 'root' }); }
|
|
406
442
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
443
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthService, decorators: [{
|
|
408
444
|
type: Injectable,
|
|
409
445
|
args: [{
|
|
410
446
|
providedIn: 'root',
|
|
@@ -424,12 +460,12 @@ class FusionAuthLoginButtonComponent {
|
|
|
424
460
|
login() {
|
|
425
461
|
this.fusionAuth.startLogin(this.state);
|
|
426
462
|
}
|
|
427
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
428
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
463
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthLoginButtonComponent, deps: [{ token: FusionAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
464
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.2", type: FusionAuthLoginButtonComponent, isStandalone: false, selector: "fa-login", inputs: { state: "state" }, ngImport: i0, template: "<button class=\"fa-button\" (click)=\"login()\">\n <span>Login</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n", ""] }); }
|
|
429
465
|
}
|
|
430
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthLoginButtonComponent, decorators: [{
|
|
431
467
|
type: Component,
|
|
432
|
-
args: [{ selector: 'fa-login', template: "<button class=\"fa-button\" (click)=\"login()\">\n <span>Login</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff
|
|
468
|
+
args: [{ standalone: false, selector: 'fa-login', template: "<button class=\"fa-button\" (click)=\"login()\">\n <span>Login</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n"] }]
|
|
433
469
|
}], ctorParameters: () => [{ type: FusionAuthService }], propDecorators: { state: [{
|
|
434
470
|
type: Input
|
|
435
471
|
}] } });
|
|
@@ -441,12 +477,12 @@ class FusionAuthLogoutButtonComponent {
|
|
|
441
477
|
logout() {
|
|
442
478
|
this.fusionAuth.logout();
|
|
443
479
|
}
|
|
444
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
445
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
480
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthLogoutButtonComponent, deps: [{ token: FusionAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
481
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.2", type: FusionAuthLogoutButtonComponent, isStandalone: false, selector: "fa-logout", ngImport: i0, template: "<button class=\"fa-button\" (click)=\"logout()\">\n <span>Logout</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n", ""] }); }
|
|
446
482
|
}
|
|
447
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
483
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthLogoutButtonComponent, decorators: [{
|
|
448
484
|
type: Component,
|
|
449
|
-
args: [{ selector: 'fa-logout', template: "<button class=\"fa-
|
|
485
|
+
args: [{ standalone: false, selector: 'fa-logout', template: "<button class=\"fa-button\" (click)=\"logout()\">\n <span>Logout</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n"] }]
|
|
450
486
|
}], ctorParameters: () => [{ type: FusionAuthService }] });
|
|
451
487
|
|
|
452
488
|
class FusionAuthRegisterButtonComponent {
|
|
@@ -456,12 +492,12 @@ class FusionAuthRegisterButtonComponent {
|
|
|
456
492
|
register() {
|
|
457
493
|
this.fusionAuth.startRegistration(this.state);
|
|
458
494
|
}
|
|
459
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
460
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
495
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthRegisterButtonComponent, deps: [{ token: FusionAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
496
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.2", type: FusionAuthRegisterButtonComponent, isStandalone: false, selector: "fa-register", inputs: { state: "state" }, ngImport: i0, template: "<button class=\"fa-button\" (click)=\"register()\">\n <span>Register Now</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n", ""] }); }
|
|
461
497
|
}
|
|
462
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
498
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthRegisterButtonComponent, decorators: [{
|
|
463
499
|
type: Component,
|
|
464
|
-
args: [{ selector: 'fa-register', template: "<button class=\"fa-button\" (click)=\"register()\">\n <span>Register Now</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff
|
|
500
|
+
args: [{ standalone: false, selector: 'fa-register', template: "<button class=\"fa-button\" (click)=\"register()\">\n <span>Register Now</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n"] }]
|
|
465
501
|
}], ctorParameters: () => [{ type: FusionAuthService }], propDecorators: { state: [{
|
|
466
502
|
type: Input
|
|
467
503
|
}] } });
|
|
@@ -473,12 +509,12 @@ class FusionAuthAccountButtonComponent {
|
|
|
473
509
|
manageAccount() {
|
|
474
510
|
this.fusionAuth.manageAccount();
|
|
475
511
|
}
|
|
476
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
477
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
512
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthAccountButtonComponent, deps: [{ token: FusionAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
513
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.2", type: FusionAuthAccountButtonComponent, isStandalone: false, selector: "fa-account", ngImport: i0, template: "<button class=\"fa-button\" (click)=\"manageAccount()\">\n <span>manage account</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n"] }); }
|
|
478
514
|
}
|
|
479
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthAccountButtonComponent, decorators: [{
|
|
480
516
|
type: Component,
|
|
481
|
-
args: [{ selector: 'fa-account', template: "<button class=\"fa-button\" (click)=\"manageAccount()\">\n <span>manage account</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff
|
|
517
|
+
args: [{ standalone: false, selector: 'fa-account', template: "<button class=\"fa-button\" (click)=\"manageAccount()\">\n <span>manage account</span>\n</button>\n", styles: [".fa-button{padding:16px 16px 13px;border-radius:8px;background-color:#083b94;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",Segoe UI Symbol;font-size:18px;font-weight:600;text-align:center;color:#fff}.fa-button:hover{cursor:pointer}.fa-button{width:400px}\n"] }]
|
|
482
518
|
}], ctorParameters: () => [{ type: FusionAuthService }] });
|
|
483
519
|
|
|
484
520
|
class FusionAuthModule {
|
|
@@ -491,17 +527,17 @@ class FusionAuthModule {
|
|
|
491
527
|
],
|
|
492
528
|
};
|
|
493
529
|
}
|
|
494
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
495
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
530
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
531
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthModule, declarations: [FusionAuthLoginButtonComponent,
|
|
496
532
|
FusionAuthLogoutButtonComponent,
|
|
497
533
|
FusionAuthRegisterButtonComponent,
|
|
498
534
|
FusionAuthAccountButtonComponent], exports: [FusionAuthLoginButtonComponent,
|
|
499
535
|
FusionAuthLogoutButtonComponent,
|
|
500
536
|
FusionAuthRegisterButtonComponent,
|
|
501
537
|
FusionAuthAccountButtonComponent] }); }
|
|
502
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
538
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthModule }); }
|
|
503
539
|
}
|
|
504
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: FusionAuthModule, decorators: [{
|
|
505
541
|
type: NgModule,
|
|
506
542
|
args: [{
|
|
507
543
|
declarations: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fusionauth-angular-sdk.mjs","sources":["../../../projects/fusionauth-angular-sdk/src/sdkcore/UrlHelper/UrlHelper.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/RedirectHelper/RedirectHelper.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/CookieHelpers/CookieHelpers.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/SDKCore/SDKCore.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/testUtils/mockLoggedIn.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/testUtils/mockWindowLocation.ts","../../../projects/fusionauth-angular-sdk/src/lib/SSRCookieAdapter.ts","../../../projects/fusionauth-angular-sdk/src/lib/injectionToken.ts","../../../projects/fusionauth-angular-sdk/src/lib/fusion-auth.service.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-login.button/fusion-auth-login-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-login.button/fusion-auth-login-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-logout.button/fusion-auth-logout-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-logout.button/fusion-auth-logout-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-register.button/fusion-auth-register-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-register.button/fusion-auth-register-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-account.button/fusion-auth-account-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-account.button/fusion-auth-account-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/fusion-auth.module.ts","../../../projects/fusionauth-angular-sdk/src/public-api.ts","../../../projects/fusionauth-angular-sdk/src/fusionauth-angular-sdk.ts"],"sourcesContent":["import { UrlHelperConfig, UrlHelperQueryParams } from './UrlHelperTypes';\n\n/** A class responsible for generating URLs that FusionAuth SDKs interact with. */\nexport class UrlHelper {\n serverUrl: string;\n clientId: string;\n redirectUri: string;\n scope?: string;\n\n mePath: string;\n loginPath: string;\n registerPath: string;\n logoutPath: string;\n tokenRefreshPath: string;\n postLogoutRedirectUri?: string;\n\n constructor(config: UrlHelperConfig) {\n this.serverUrl = config.serverUrl;\n this.clientId = config.clientId;\n this.redirectUri = config.redirectUri;\n this.scope = config.scope;\n this.postLogoutRedirectUri = config.postLogoutRedirectUri;\n\n this.mePath = config.mePath ?? '/app/me/';\n this.loginPath = config.loginPath ?? '/app/login/';\n this.registerPath = config.registerPath ?? '/app/register/';\n this.logoutPath = config.logoutPath ?? '/app/logout/';\n this.tokenRefreshPath = config.tokenRefreshPath ?? '/app/refresh/';\n }\n\n getMeUrl(): URL {\n return this.generateUrl(this.mePath);\n }\n\n getLoginUrl(state?: string): URL {\n return this.generateUrl(this.loginPath, {\n client_id: this.clientId,\n redirect_uri: this.redirectUri,\n scope: this.scope,\n state,\n });\n }\n\n getRegisterUrl(state?: string): URL {\n return this.generateUrl(this.registerPath, {\n client_id: this.clientId,\n redirect_uri: this.redirectUri,\n scope: this.scope,\n state,\n });\n }\n\n getLogoutUrl(): URL {\n return this.generateUrl(this.logoutPath, {\n client_id: this.clientId,\n post_logout_redirect_uri: this.postLogoutRedirectUri || this.redirectUri,\n });\n }\n\n getTokenRefreshUrl(): URL {\n return this.generateUrl(this.tokenRefreshPath, {\n client_id: this.clientId,\n });\n }\n\n getAccountManagementUrl(): URL {\n return this.generateUrl('/account/', {\n client_id: this.clientId,\n });\n }\n\n private generateUrl(path: string, params?: UrlHelperQueryParams): URL {\n const url = new URL(this.serverUrl);\n url.pathname = path;\n\n if (params) {\n const urlSearchParams = this.generateURLSearchParams(params);\n url.search = urlSearchParams.toString();\n }\n\n return url;\n }\n\n private generateURLSearchParams(\n params: UrlHelperQueryParams,\n ): URLSearchParams {\n const urlSearchParams = new URLSearchParams();\n\n Object.entries(params).forEach(([key, value]) => {\n if (value) {\n urlSearchParams.append(key, value);\n }\n });\n\n return urlSearchParams;\n }\n}\n","/** A class responsible for storing a redirect value in localStorage and cleanup afterward. */\nexport class RedirectHelper {\n private readonly REDIRECT_VALUE = 'fa-sdk-redirect-value';\n private get storage(): Storage {\n try {\n return localStorage;\n } catch {\n // fallback for non-browser environments where localStorage is not defined.\n return {\n /* eslint-disable */\n setItem(_key: string, _value: string) {},\n getItem(_key: string) {},\n removeItem(_key: string) {},\n /* eslint-enable */\n } as Storage;\n }\n }\n\n handlePreRedirect(state?: string) {\n const valueForStorage = `${this.generateRandomString()}:${state ?? ''}`;\n this.storage.setItem(this.REDIRECT_VALUE, valueForStorage);\n }\n\n handlePostRedirect(callback?: (state?: string) => void) {\n const stateValue = this.stateValue ?? undefined;\n callback?.(stateValue);\n this.storage.removeItem(this.REDIRECT_VALUE);\n }\n\n get didRedirect() {\n return Boolean(this.storage.getItem(this.REDIRECT_VALUE));\n }\n\n private get stateValue() {\n const redirectValue = this.storage.getItem(this.REDIRECT_VALUE);\n\n if (!redirectValue) {\n return null;\n }\n\n const [, ...stateValue] = redirectValue.split(':');\n return stateValue.join(':');\n }\n\n private generateRandomString() {\n const array = new Uint32Array(56 / 2);\n window.crypto.getRandomValues(array);\n return Array.from(array, (n: number) =>\n ('0' + n.toString(16)).substring(-2),\n ).join('');\n }\n}\n","/**\n * Gets the `app.at_exp` cookie and converts it to milliseconds since epoch.\n * Returns -1 if the cookie is not present.\n * @param cookieName - defaults to `app.at_exp`.\n * @param adapter - SSR frameworks like Nuxt, Next, and angular/ssr will pass in an adapter.\n */\nexport function getAccessTokenExpirationMoment(\n cookieName: string = 'app.at_exp',\n adapter?: CookieAdapter,\n): number | -1 {\n if (adapter) {\n return toMilliseconds(adapter.at_exp(cookieName));\n }\n\n let cookie;\n\n try {\n // `document` throws a ReferenceError if this runs in a\n // non-browser environment such as an SSR framework like Nuxt or Next.\n cookie = document.cookie;\n } catch {\n console.error(\n 'Error accessing cookies in fusionauth. If you are using SSR you must configure the SDK with a cookie adapter',\n );\n return -1;\n }\n\n const expCookie = cookie\n .split('; ')\n .map(c => c.split('='))\n .find(([name]) => name === cookieName);\n const cookieValue = expCookie?.[1];\n\n return toMilliseconds(cookieValue);\n}\n\nexport interface CookieAdapter {\n /** returns the `app.at_exp` cookie without manipulating the value. */\n at_exp: (cookieName?: string) => number | string | undefined;\n}\n\nfunction toMilliseconds(seconds?: number | string): number {\n if (!seconds) return -1;\n else return Number(seconds) * 1000;\n}\n","import { UrlHelper } from '../UrlHelper';\nimport { SDKConfig } from '../SDKConfig';\nimport { UserInfo } from '../SDKContext';\nimport { RedirectHelper } from '../RedirectHelper';\nimport { getAccessTokenExpirationMoment } from '../CookieHelpers';\n\n/** A class containing framework-agnostic SDK methods */\nexport class SDKCore {\n private config: SDKConfig;\n private urlHelper: UrlHelper;\n private redirectHelper: RedirectHelper = new RedirectHelper();\n private tokenExpirationTimeout?: NodeJS.Timeout;\n\n constructor(config: SDKConfig) {\n this.config = config;\n this.urlHelper = new UrlHelper({\n serverUrl: config.serverUrl,\n clientId: config.clientId,\n redirectUri: config.redirectUri,\n scope: config.scope,\n mePath: config.mePath,\n loginPath: config.loginPath,\n registerPath: config.registerPath,\n logoutPath: config.logoutPath,\n tokenRefreshPath: config.tokenRefreshPath,\n postLogoutRedirectUri: config.postLogoutRedirectUri,\n });\n this.scheduleTokenExpiration();\n }\n\n startLogin(state?: string) {\n this.redirectHelper.handlePreRedirect(state);\n window.location.assign(this.urlHelper.getLoginUrl(state));\n }\n\n startRegister(state?: string) {\n this.redirectHelper.handlePreRedirect(state);\n window.location.assign(this.urlHelper.getRegisterUrl(state));\n }\n\n startLogout() {\n window.location.assign(this.urlHelper.getLogoutUrl());\n }\n\n manageAccount() {\n window.location.assign(this.urlHelper.getAccountManagementUrl());\n }\n\n async fetchUserInfo<T = UserInfo>() {\n const userInfoResponse = await fetch(this.urlHelper.getMeUrl(), {\n credentials: 'include',\n });\n\n if (!userInfoResponse.ok) {\n throw new Error(\n `Unable to fetch userInfo in fusionauth. Request failed with status code ${userInfoResponse?.status}`,\n );\n }\n\n const userInfo: T = await userInfoResponse.json();\n return userInfo;\n }\n\n async refreshToken(): Promise<Response> {\n const response = await fetch(this.urlHelper.getTokenRefreshUrl(), {\n method: 'POST',\n credentials: 'include',\n headers: {\n 'Content-Type': 'text/plain',\n },\n });\n\n if (!(response.status >= 200 && response.status < 300)) {\n const message =\n (await response?.text()) ||\n 'Error refreshing access token in fusionauth';\n throw new Error(message);\n }\n\n // a successful request means that app_exp was bumped into the future.\n // reschedule the access token expiration event.\n this.scheduleTokenExpiration();\n\n return response;\n }\n\n initAutoRefresh(): NodeJS.Timeout | undefined {\n if (!this.isLoggedIn) {\n return;\n }\n\n const secondsBeforeRefresh =\n this.config.autoRefreshSecondsBeforeExpiry ?? 10;\n\n const millisecondsBeforeRefresh = secondsBeforeRefresh * 1000;\n\n const now = new Date().getTime();\n const refreshTime = this.at_exp - millisecondsBeforeRefresh;\n const timeTillRefresh = Math.max(refreshTime - now, 0);\n\n return setTimeout(async () => {\n try {\n await this.refreshToken();\n this.initAutoRefresh();\n } catch (error) {\n this.config.onAutoRefreshFailure?.(error as Error);\n }\n }, timeTillRefresh);\n }\n\n handlePostRedirect(callback?: (state?: string) => void) {\n if (this.isLoggedIn && this.redirectHelper.didRedirect) {\n this.redirectHelper.handlePostRedirect(callback);\n }\n }\n\n get isLoggedIn() {\n return this.at_exp > new Date().getTime();\n }\n\n /** The moment of access token expiration in milliseconds since epoch. */\n private get at_exp(): number | -1 {\n return getAccessTokenExpirationMoment(\n this.config.accessTokenExpireCookieName,\n this.config.cookieAdapter,\n );\n }\n\n /**\n * Schedules `onTokenExpiration` at moment of access token expiration.\n * SDKCore is not necessarily reactive like React, Angular, and Vue.\n * so `onTokenExpiration` is for reactive frameworks to hook in and perform actions as on token expiration.\n */\n private scheduleTokenExpiration(): void {\n clearTimeout(this.tokenExpirationTimeout);\n\n const now = new Date().getTime();\n const millisecondsTillExpiration = this.at_exp - now;\n\n if (millisecondsTillExpiration > 0) {\n this.tokenExpirationTimeout = setTimeout(\n this.config.onTokenExpiration,\n millisecondsTillExpiration,\n );\n }\n }\n}\n","/** Sets `app.at_exp` moment cookie so the user will be logged in for 1 hour. */\nfunction mockIsLoggedIn() {\n const expirationMoment = new Date();\n expirationMoment.setHours(expirationMoment.getHours() + 1);\n const oneHourInTheFutureInMilliseconds = expirationMoment.getTime() / 1000;\n document.cookie = `app.at_exp=${oneHourInTheFutureInMilliseconds}`;\n}\n\n/** Removes the `app.at_exp` cookie. */\nfunction removeAt_expCookie() {\n document.cookie = 'app.at_exp' + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT';\n}\n\nexport { mockIsLoggedIn, removeAt_expCookie };\n","import { VitestUtils } from 'vitest';\n\nfunction mockWindowLocation(vi: VitestUtils) {\n const mockedLocation = {\n ...window.location,\n assign: vi.fn(),\n };\n vi.spyOn(window, 'location', 'get').mockReturnValue(mockedLocation);\n return mockedLocation;\n}\n\nexport { mockWindowLocation };\n","import { CookieAdapter } from '../sdkcore';\n\n/** An adapter class that supports accessing cookies with SSR */\nexport class SSRCookieAdapter implements CookieAdapter {\n constructor(private isBrowser: boolean) {}\n\n at_exp(cookieName: string = 'app.at_exp') {\n if (!this.isBrowser) {\n return;\n }\n\n try {\n const expCookie = document.cookie\n .split('; ')\n .map(c => c.split('='))\n .find(([name]) => name === cookieName);\n return expCookie?.[1];\n } catch (error) {\n console.error('Error within the SSRCookieAdapter: ', error);\n return -1;\n }\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { FusionAuthConfig } from './types';\n\nexport const FUSIONAUTH_SERVICE_CONFIG = new InjectionToken<FusionAuthConfig>(\n 'FUSIONAUTH_SERVICE_CONFIG',\n);\n","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Observable, catchError, BehaviorSubject } from 'rxjs';\n\nimport { SDKCore } from '../sdkcore';\nimport { SSRCookieAdapter } from './SSRCookieAdapter';\nimport { FusionAuthConfig, UserInfo } from './types';\nimport { FUSIONAUTH_SERVICE_CONFIG } from './injectionToken';\n\n/**\n * Service class to use with FusionAuth backend endpoints.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class FusionAuthService<T = UserInfo> {\n private core: SDKCore;\n private autoRefreshTimer?: NodeJS.Timeout;\n private isLoggedInSubject: BehaviorSubject<boolean>;\n\n constructor(\n @Inject(FUSIONAUTH_SERVICE_CONFIG) config: FusionAuthConfig,\n @Inject(PLATFORM_ID) platformId: Object,\n ) {\n this.core = new SDKCore({\n ...config,\n onTokenExpiration: () => {\n this.isLoggedInSubject.next(false);\n },\n cookieAdapter: new SSRCookieAdapter(isPlatformBrowser(platformId)),\n });\n\n this.isLoggedInSubject = new BehaviorSubject(this.core.isLoggedIn);\n this.isLoggedIn$ = this.isLoggedInSubject.asObservable();\n\n this.core.handlePostRedirect(config.onRedirect);\n\n if (config.shouldAutoRefresh && this.core.isLoggedIn) {\n this.initAutoRefresh();\n }\n }\n\n /** An observable representing whether the user is logged in. */\n isLoggedIn$: Observable<boolean>;\n\n /** A function that returns whether the user is logged in. This returned value is non-observable. */\n isLoggedIn() {\n return this.core.isLoggedIn;\n }\n\n /**\n * Refreshes the access token a single time.\n * Automatic token refreshing can be enabled if the SDK is configured with `shouldAutoRefresh`.\n */\n async refreshToken(): Promise<Response> {\n return await this.core.refreshToken();\n }\n\n /**\n * Initializes automatic access token refreshing.\n * This is handled automatically if the SDK is configured with `shouldAutoRefresh`.\n */\n initAutoRefresh(): void {\n if (this.autoRefreshTimer) {\n clearTimeout(this.autoRefreshTimer);\n }\n\n this.autoRefreshTimer = this.core.initAutoRefresh();\n }\n\n /**\n * Returns an observable request that fetches userInfo, and catches error.\n */\n getUserInfoObservable(callbacks?: {\n onBegin?: () => void;\n onDone?: () => void;\n }): Observable<T> {\n callbacks?.onBegin?.();\n return new Observable<T>(observer => {\n this.core\n .fetchUserInfo<T>()\n .then(userInfo => {\n observer.next(userInfo);\n })\n .catch(error => {\n observer.error(error);\n })\n .finally(() => {\n callbacks?.onDone?.();\n });\n }).pipe(\n catchError(error => {\n throw error;\n }),\n );\n }\n\n /**\n * Fetches userInfo from the 'me' endpoint.\n * @throws {Error} - if an error occurred while fetching.\n */\n async getUserInfo<T>(): Promise<T> {\n return await this.core.fetchUserInfo<T>();\n }\n\n /**\n * Initiates login flow.\n * @param {string} [state] - Optional value to be echoed back to the SDK upon redirect.\n */\n startLogin(state?: string): void {\n this.core.startLogin(state);\n }\n\n /**\n * Initiates register flow.\n * @param {string} [state] - Optional value to be echoed back to the SDK upon redirect.\n */\n startRegistration(state?: string): void {\n this.core.startRegister(state);\n }\n\n /**\n * Initiates logout flow.\n */\n logout(): void {\n this.core.startLogout();\n }\n\n /**\n * Redirects to [self service account management](https://fusionauth.io/docs/lifecycle/manage-users/account-management/)\n * Self service account management is only available in FusionAuth paid plans.\n */\n manageAccount(): void {\n this.core.manageAccount();\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n selector: 'fa-login',\n templateUrl: './fusion-auth-login-button.component.html',\n styleUrls: ['./fusion-auth-login-button.component.scss'],\n})\nexport class FusionAuthLoginButtonComponent {\n @Input() state: string | undefined;\n\n constructor(private fusionAuth: FusionAuthService) {}\n\n login() {\n this.fusionAuth.startLogin(this.state);\n }\n}\n","<button class=\"fa-button\" (click)=\"login()\">\n <span>Login</span>\n</button>\n","import { Component } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n selector: 'fa-logout',\n templateUrl: './fusion-auth-logout-button.component.html',\n styleUrls: ['./fusion-auth-logout-button.component.scss'],\n})\nexport class FusionAuthLogoutButtonComponent {\n constructor(private fusionAuth: FusionAuthService) {}\n\n logout() {\n this.fusionAuth.logout();\n }\n}\n","<button class=\"fa-logout-button\" (click)=\"logout()\">\n <span>logout</span>\n</button>\n","import { Component, Input } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n selector: 'fa-register',\n templateUrl: './fusion-auth-register-button.component.html',\n styleUrls: ['./fusion-auth-register-button.component.scss'],\n})\nexport class FusionAuthRegisterButtonComponent {\n @Input() state: string | undefined;\n\n constructor(private fusionAuth: FusionAuthService) {}\n\n register() {\n this.fusionAuth.startRegistration(this.state);\n }\n}\n","<button class=\"fa-button\" (click)=\"register()\">\n <span>Register Now</span>\n</button>\n","import { Component } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n selector: 'fa-account',\n templateUrl: './fusion-auth-account-button.component.html',\n styleUrls: ['./fusion-auth-account-button.component.scss'],\n})\nexport class FusionAuthAccountButtonComponent {\n constructor(private fusionAuth: FusionAuthService) {}\n\n manageAccount() {\n this.fusionAuth.manageAccount();\n }\n}\n","<button class=\"fa-button\" (click)=\"manageAccount()\">\n <span>manage account</span>\n</button>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { FusionAuthConfig } from './types';\nimport { FusionAuthService } from './fusion-auth.service';\nimport { FUSIONAUTH_SERVICE_CONFIG } from './injectionToken';\nimport { FusionAuthLoginButtonComponent } from './components/fusionauth-login.button/fusion-auth-login-button.component';\nimport { FusionAuthLogoutButtonComponent } from './components/fusionauth-logout.button/fusion-auth-logout-button.component';\nimport { FusionAuthRegisterButtonComponent } from './components/fusionauth-register.button/fusion-auth-register-button.component';\nimport { FusionAuthAccountButtonComponent } from './components/fusionauth-account.button/fusion-auth-account-button.component';\n\n@NgModule({\n declarations: [\n FusionAuthLoginButtonComponent,\n FusionAuthLogoutButtonComponent,\n FusionAuthRegisterButtonComponent,\n FusionAuthAccountButtonComponent,\n ],\n imports: [],\n exports: [\n FusionAuthLoginButtonComponent,\n FusionAuthLogoutButtonComponent,\n FusionAuthRegisterButtonComponent,\n FusionAuthAccountButtonComponent,\n ],\n})\nexport class FusionAuthModule {\n static forRoot(\n fusionAuthConfig: FusionAuthConfig,\n ): ModuleWithProviders<FusionAuthModule> {\n return {\n ngModule: FusionAuthModule,\n providers: [\n { provide: FUSIONAUTH_SERVICE_CONFIG, useValue: fusionAuthConfig },\n FusionAuthService,\n ],\n };\n }\n}\n","/*\n * Public API Surface of fusionauth-angular-sdk\n */\n\nexport * from './lib/fusion-auth.service';\nexport * from './lib/components/fusionauth-login.button/fusion-auth-login-button.component';\nexport * from './lib/components/fusionauth-logout.button/fusion-auth-logout-button.component';\nexport * from './lib/components/fusionauth-register.button/fusion-auth-register-button.component';\nexport * from './lib/components/fusionauth-account.button/fusion-auth-account-button.component';\nexport * from './lib/fusion-auth.module';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.FusionAuthService"],"mappings":";;;;;AAEA;MACa,SAAS,CAAA;AAapB,IAAA,WAAA,CAAY,MAAuB,EAAA;AACjC,QAAA,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAClC,QAAA,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAChC,QAAA,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,C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AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fusionauth-angular-sdk.mjs","sources":["../../../projects/fusionauth-angular-sdk/src/sdkcore/UrlHelper/UrlHelper.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/RedirectHelper/RedirectHelper.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/CookieHelpers/CookieHelpers.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/SDKCore/SDKCore.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/testUtils/mockLoggedIn.ts","../../../projects/fusionauth-angular-sdk/src/sdkcore/testUtils/mockWindowLocation.ts","../../../projects/fusionauth-angular-sdk/src/lib/SSRCookieAdapter.ts","../../../projects/fusionauth-angular-sdk/src/lib/injectionToken.ts","../../../projects/fusionauth-angular-sdk/src/lib/fusion-auth.service.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-login.button/fusion-auth-login-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-login.button/fusion-auth-login-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-logout.button/fusion-auth-logout-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-logout.button/fusion-auth-logout-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-register.button/fusion-auth-register-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-register.button/fusion-auth-register-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-account.button/fusion-auth-account-button.component.ts","../../../projects/fusionauth-angular-sdk/src/lib/components/fusionauth-account.button/fusion-auth-account-button.component.html","../../../projects/fusionauth-angular-sdk/src/lib/fusion-auth.module.ts","../../../projects/fusionauth-angular-sdk/src/public-api.ts","../../../projects/fusionauth-angular-sdk/src/fusionauth-angular-sdk.ts"],"sourcesContent":["import { UrlHelperConfig, UrlHelperQueryParams } from './UrlHelperTypes';\n\n/** A class responsible for generating URLs that FusionAuth SDKs interact with. */\nexport class UrlHelper {\n serverUrl: string;\n clientId: string;\n redirectUri: string;\n scope?: string;\n authParams?: { [key: string]: any }[];\n\n mePath: string;\n loginPath: string;\n registerPath: string;\n logoutPath: string;\n tokenRefreshPath: string;\n postLogoutRedirectUri?: string;\n\n constructor(config: UrlHelperConfig) {\n this.serverUrl = config.serverUrl;\n this.clientId = config.clientId;\n this.redirectUri = config.redirectUri;\n this.scope = config.scope;\n this.authParams = config.authParams;\n this.postLogoutRedirectUri = config.postLogoutRedirectUri;\n\n this.mePath = config.mePath ?? '/app/me/';\n this.loginPath = config.loginPath ?? '/app/login/';\n this.registerPath = config.registerPath ?? '/app/register/';\n this.logoutPath = config.logoutPath ?? '/app/logout/';\n this.tokenRefreshPath = config.tokenRefreshPath ?? '/app/refresh/';\n }\n\n getMeUrl(): URL {\n return this.generateUrl(this.mePath);\n }\n\n getLoginUrl(state?: string): URL {\n return this.generateUrl(this.loginPath, {\n client_id: this.clientId,\n redirect_uri: this.redirectUri,\n scope: this.scope,\n authParams: this.authParams,\n state,\n });\n }\n\n getRegisterUrl(state?: string): URL {\n return this.generateUrl(this.registerPath, {\n client_id: this.clientId,\n redirect_uri: this.redirectUri,\n scope: this.scope,\n authParams: this.authParams,\n state,\n });\n }\n\n getLogoutUrl(): URL {\n return this.generateUrl(this.logoutPath, {\n client_id: this.clientId,\n post_logout_redirect_uri: this.postLogoutRedirectUri || this.redirectUri,\n });\n }\n\n getTokenRefreshUrl(): URL {\n return this.generateUrl(this.tokenRefreshPath, {\n client_id: this.clientId,\n });\n }\n\n getAccountManagementUrl(): URL {\n return this.generateUrl('/account/', {\n client_id: this.clientId,\n });\n }\n\n private generateUrl(path: string, params?: UrlHelperQueryParams): URL {\n const url = new URL(this.serverUrl);\n url.pathname = path;\n\n if (params) {\n const urlSearchParams = this.generateURLSearchParams(params);\n url.search = urlSearchParams.toString();\n }\n\n return url;\n }\n\n private generateURLSearchParams(\n params: UrlHelperQueryParams,\n ): URLSearchParams {\n const urlSearchParams = new URLSearchParams();\n this.appendParams(params, urlSearchParams);\n return urlSearchParams;\n }\n\n private appendParams(\n params: Record<string, any>, // or a more specific type if known\n urlSearchParams: URLSearchParams,\n ): void {\n Object.entries(params).forEach(([key, value]) => {\n if ((value && typeof value === 'object') || Array.isArray(value)) {\n // Recursively handle nested objects\n this.appendParams(value, urlSearchParams);\n } else if (value !== undefined && value !== null) {\n // Append primitive values\n urlSearchParams.append(key, String(value));\n }\n });\n }\n}\n","/** A class responsible for storing a redirect value in localStorage and cleanup afterward. */\nexport class RedirectHelper {\n private readonly REDIRECT_VALUE = 'fa-sdk-redirect-value';\n private get storage(): Storage {\n try {\n return localStorage;\n } catch {\n // fallback for non-browser environments where localStorage is not defined.\n return {\n /* eslint-disable */\n setItem(_key: string, _value: string) {},\n getItem(_key: string) {},\n removeItem(_key: string) {},\n /* eslint-enable */\n } as Storage;\n }\n }\n\n handlePreRedirect(state?: string) {\n const valueForStorage = `${this.generateRandomString()}:${state ?? ''}`;\n this.storage.setItem(this.REDIRECT_VALUE, valueForStorage);\n }\n\n handlePostRedirect(callback?: (state?: string) => void) {\n const didRedirect = Boolean(this.storage.getItem(this.REDIRECT_VALUE));\n if (!didRedirect) {\n return;\n }\n\n const state = this.state;\n callback?.(state);\n this.storage.removeItem(this.REDIRECT_VALUE);\n }\n\n private get state() {\n const redirectValue = this.storage.getItem(this.REDIRECT_VALUE);\n\n if (!redirectValue) {\n return;\n }\n\n const [, ...stateValue] = redirectValue.split(':');\n return stateValue.join(':') || undefined;\n }\n\n private generateRandomString() {\n const array = new Uint32Array(56 / 2);\n window.crypto.getRandomValues(array);\n return Array.from(array, (n: number) =>\n ('0' + n.toString(16)).substring(-2),\n ).join('');\n }\n}\n","/**\n * Gets the `app.at_exp` cookie and converts it to milliseconds since epoch.\n * Returns -1 if the cookie is not present.\n * @param cookieName - defaults to `app.at_exp`.\n * @param adapter - SSR frameworks like Nuxt, Next, and angular/ssr will pass in an adapter.\n */\nexport function getAccessTokenExpirationMoment(\n cookieName: string = 'app.at_exp',\n adapter?: CookieAdapter,\n): number | -1 {\n if (adapter) {\n return toMilliseconds(adapter.at_exp(cookieName));\n }\n\n let cookie;\n\n try {\n // `document` throws a ReferenceError if this runs in a\n // non-browser environment such as an SSR framework like Nuxt or Next.\n cookie = document.cookie;\n } catch {\n console.error(\n 'Error accessing cookies in fusionauth. If you are using SSR you must configure the SDK with a cookie adapter',\n );\n return -1;\n }\n\n const expCookie = cookie\n .split('; ')\n .map(c => c.split('='))\n .find(([name]) => name === cookieName);\n const cookieValue = expCookie?.[1];\n\n return toMilliseconds(cookieValue);\n}\n\nexport interface CookieAdapter {\n /** returns the `app.at_exp` cookie without manipulating the value. */\n at_exp: (cookieName?: string) => number | string | undefined;\n}\n\nfunction toMilliseconds(seconds?: number | string): number {\n if (!seconds) return -1;\n else return Number(seconds) * 1000;\n}\n","import { UrlHelper } from '../UrlHelper';\nimport { SDKConfig } from '../SDKConfig';\nimport { UserInfo } from '../SDKContext';\nimport { RedirectHelper } from '../RedirectHelper';\nimport { getAccessTokenExpirationMoment } from '../CookieHelpers';\n\n/** A class containing framework-agnostic SDK methods */\nexport class SDKCore {\n private config: SDKConfig;\n private urlHelper: UrlHelper;\n private redirectHelper: RedirectHelper = new RedirectHelper();\n private tokenExpirationTimeout?: NodeJS.Timeout;\n private refreshTokenTimeout?: NodeJS.Timeout;\n private isDisposed = false;\n\n constructor(config: SDKConfig) {\n this.config = config;\n this.urlHelper = new UrlHelper({\n serverUrl: config.serverUrl,\n clientId: config.clientId,\n redirectUri: config.redirectUri,\n scope: config.scope,\n authParams: config.authParams,\n mePath: config.mePath,\n loginPath: config.loginPath,\n registerPath: config.registerPath,\n logoutPath: config.logoutPath,\n tokenRefreshPath: config.tokenRefreshPath,\n postLogoutRedirectUri: config.postLogoutRedirectUri,\n });\n this.scheduleTokenExpiration();\n }\n\n dispose() {\n clearTimeout(this.tokenExpirationTimeout);\n clearTimeout(this.refreshTokenTimeout);\n this.isDisposed = true;\n }\n\n startLogin(state?: string) {\n this.redirectHelper.handlePreRedirect(state);\n window.location.assign(this.urlHelper.getLoginUrl(state));\n }\n\n startRegister(state?: string) {\n this.redirectHelper.handlePreRedirect(state);\n window.location.assign(this.urlHelper.getRegisterUrl(state));\n }\n\n startLogout() {\n window.location.assign(this.urlHelper.getLogoutUrl());\n }\n\n manageAccount() {\n window.location.assign(this.urlHelper.getAccountManagementUrl());\n }\n\n async fetchUserInfo<T = UserInfo>() {\n const userInfoResponse = await fetch(this.urlHelper.getMeUrl(), {\n credentials: 'include',\n });\n\n if (!userInfoResponse.ok) {\n throw new Error(\n `Unable to fetch userInfo in fusionauth. Request failed with status code ${userInfoResponse?.status}`,\n );\n }\n\n const userInfo: T = await userInfoResponse.json();\n return userInfo;\n }\n\n async refreshToken(): Promise<Response> {\n const response = await fetch(this.urlHelper.getTokenRefreshUrl(), {\n method: 'POST',\n credentials: 'include',\n headers: {\n 'Content-Type': 'text/plain',\n },\n });\n if (!(response.status >= 200 && response.status < 300)) {\n const errorDetails = {\n status: response.status,\n details:\n (await response?.text()) ||\n 'Failed to refresh fusionauth access token',\n };\n throw new Error(JSON.stringify(errorDetails));\n }\n\n // a successful request means that app_exp was bumped into the future.\n // reschedule the access token expiration event.\n this.scheduleTokenExpiration();\n\n return response;\n }\n\n initAutoRefresh(): NodeJS.Timeout | undefined {\n // Clear any pending refresh so repeated calls (e.g. a reactive framework\n // re-running an effect) doesn't leave duplicate timers running.\n clearTimeout(this.refreshTokenTimeout);\n\n if (!this.isLoggedIn || this.isDisposed) {\n return;\n }\n\n const secondsBeforeRefresh =\n this.config.autoRefreshSecondsBeforeExpiry ?? 10;\n\n const millisecondsBeforeRefresh = secondsBeforeRefresh * 1000;\n\n const now = new Date().getTime();\n const refreshTime = this.at_exp - millisecondsBeforeRefresh;\n const timeTillRefresh = Math.max(refreshTime - now, 0);\n\n this.refreshTokenTimeout = setTimeout(async () => {\n try {\n await this.refreshToken();\n this.initAutoRefresh();\n } catch (error) {\n this.config.onAutoRefreshFailure?.(error as Error);\n }\n }, timeTillRefresh);\n\n return this.refreshTokenTimeout;\n }\n\n /**\n * Cancels a pending automatic token refresh without disposing the core.\n * Unlike {@link dispose}, the core remains usable and auto refresh can be\n * restarted via {@link initAutoRefresh}. This makes it safe to stop/start\n * across React StrictMode's mount → unmount → remount cycle.\n */\n stopAutoRefresh(): void {\n clearTimeout(this.refreshTokenTimeout);\n }\n\n handlePostRedirect(callback?: (state?: string) => void) {\n if (this.isLoggedIn) {\n this.redirectHelper.handlePostRedirect(callback);\n }\n }\n\n get isLoggedIn() {\n return this.at_exp > new Date().getTime();\n }\n\n /** The moment of access token expiration in milliseconds since epoch. */\n private get at_exp(): number | -1 {\n return getAccessTokenExpirationMoment(\n this.config.accessTokenExpireCookieName,\n this.config.cookieAdapter,\n );\n }\n\n /**\n * Schedules `onTokenExpiration` at moment of access token expiration.\n * SDKCore is not necessarily reactive like React, Angular, and Vue.\n * so `onTokenExpiration` is for reactive frameworks to hook in and perform actions as on token expiration.\n */\n private scheduleTokenExpiration(): void {\n clearTimeout(this.tokenExpirationTimeout);\n\n const now = new Date().getTime();\n const millisecondsTillExpiration = this.at_exp - now;\n\n if (millisecondsTillExpiration > 0) {\n this.tokenExpirationTimeout = setTimeout(\n this.config.onTokenExpiration,\n millisecondsTillExpiration,\n );\n }\n }\n}\n","/** Sets `app.at_exp` moment cookie so the user will be logged in for 1 hour. */\nfunction mockIsLoggedIn() {\n const expirationMoment = new Date();\n expirationMoment.setHours(expirationMoment.getHours() + 1);\n const oneHourInTheFutureInMilliseconds = expirationMoment.getTime() / 1000;\n document.cookie = `app.at_exp=${oneHourInTheFutureInMilliseconds}`;\n}\n\n/** Removes the `app.at_exp` cookie. */\nfunction removeAt_expCookie() {\n document.cookie = 'app.at_exp' + '=;expires=Thu, 01 Jan 1970 00:00:00 GMT';\n}\n\nexport { mockIsLoggedIn, removeAt_expCookie };\n","import { VitestUtils } from 'vitest';\n\nfunction mockWindowLocation(vi: VitestUtils) {\n const mockedLocation = {\n ...window.location,\n assign: vi.fn(),\n };\n vi.spyOn(window, 'location', 'get').mockReturnValue(mockedLocation);\n return mockedLocation;\n}\n\nexport { mockWindowLocation };\n","import { CookieAdapter } from '../sdkcore';\n\n/** An adapter class that supports accessing cookies with SSR */\nexport class SSRCookieAdapter implements CookieAdapter {\n constructor(private isBrowser: boolean) {}\n\n at_exp(cookieName: string = 'app.at_exp') {\n if (!this.isBrowser) {\n return;\n }\n\n try {\n const expCookie = document.cookie\n .split('; ')\n .map(c => c.split('='))\n .find(([name]) => name === cookieName);\n return expCookie?.[1];\n } catch (error) {\n console.error('Error within the SSRCookieAdapter: ', error);\n return -1;\n }\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { FusionAuthConfig } from './types';\n\nexport const FUSIONAUTH_SERVICE_CONFIG = new InjectionToken<FusionAuthConfig>(\n 'FUSIONAUTH_SERVICE_CONFIG',\n);\n","import { Injectable, Inject, PLATFORM_ID } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { Observable, catchError, BehaviorSubject } from 'rxjs';\n\nimport { SDKCore } from '../sdkcore';\nimport { SSRCookieAdapter } from './SSRCookieAdapter';\nimport { FusionAuthConfig, UserInfo } from './types';\nimport { FUSIONAUTH_SERVICE_CONFIG } from './injectionToken';\n\n/**\n * Service class to use with FusionAuth backend endpoints.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class FusionAuthService<T = UserInfo> {\n private core: SDKCore;\n private autoRefreshTimer?: NodeJS.Timeout;\n private isLoggedInSubject: BehaviorSubject<boolean>;\n\n constructor(\n @Inject(FUSIONAUTH_SERVICE_CONFIG) config: FusionAuthConfig,\n @Inject(PLATFORM_ID) platformId: Object,\n ) {\n this.core = new SDKCore({\n ...config,\n onTokenExpiration: () => {\n this.isLoggedInSubject.next(false);\n },\n cookieAdapter: new SSRCookieAdapter(isPlatformBrowser(platformId)),\n });\n\n this.isLoggedInSubject = new BehaviorSubject(this.core.isLoggedIn);\n this.isLoggedIn$ = this.isLoggedInSubject.asObservable();\n\n this.core.handlePostRedirect(config.onRedirect);\n\n if (config.shouldAutoRefresh && this.core.isLoggedIn) {\n this.initAutoRefresh();\n }\n }\n\n /** An observable representing whether the user is logged in. */\n isLoggedIn$: Observable<boolean>;\n\n /** A function that returns whether the user is logged in. This returned value is non-observable. */\n isLoggedIn() {\n return this.core.isLoggedIn;\n }\n\n /**\n * Refreshes the access token a single time.\n * Automatic token refreshing can be enabled if the SDK is configured with `shouldAutoRefresh`.\n */\n async refreshToken(): Promise<Response> {\n return await this.core.refreshToken();\n }\n\n /**\n * Initializes automatic access token refreshing.\n * This is handled automatically if the SDK is configured with `shouldAutoRefresh`.\n */\n initAutoRefresh(): void {\n if (this.autoRefreshTimer) {\n clearTimeout(this.autoRefreshTimer);\n }\n\n this.autoRefreshTimer = this.core.initAutoRefresh();\n }\n\n /**\n * Returns an observable request that fetches userInfo, and catches error.\n */\n getUserInfoObservable(callbacks?: {\n onBegin?: () => void;\n onDone?: () => void;\n }): Observable<T> {\n callbacks?.onBegin?.();\n return new Observable<T>(observer => {\n this.core\n .fetchUserInfo<T>()\n .then(userInfo => {\n observer.next(userInfo);\n })\n .catch(error => {\n observer.error(error);\n })\n .finally(() => {\n callbacks?.onDone?.();\n });\n }).pipe(\n catchError(error => {\n throw error;\n }),\n );\n }\n\n /**\n * Fetches userInfo from the 'me' endpoint.\n * @throws {Error} - if an error occurred while fetching.\n */\n async getUserInfo<T>(): Promise<T> {\n return await this.core.fetchUserInfo<T>();\n }\n\n /**\n * Initiates login flow.\n * @param {string} [state] - Optional value to be echoed back to the SDK upon redirect.\n */\n startLogin(state?: string): void {\n this.core.startLogin(state);\n }\n\n /**\n * Initiates register flow.\n * @param {string} [state] - Optional value to be echoed back to the SDK upon redirect.\n */\n startRegistration(state?: string): void {\n this.core.startRegister(state);\n }\n\n /**\n * Initiates logout flow.\n */\n logout(): void {\n this.core.startLogout();\n }\n\n /**\n * Redirects to [self service account management](https://fusionauth.io/docs/lifecycle/manage-users/account-management/)\n * Self service account management is only available in FusionAuth paid plans.\n */\n manageAccount(): void {\n this.core.manageAccount();\n }\n}\n","import { Component, Input } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n standalone: false,\n selector: 'fa-login',\n templateUrl: './fusion-auth-login-button.component.html',\n styleUrls: ['../fa-button.scss', './fusion-auth-login-button.component.scss'],\n})\nexport class FusionAuthLoginButtonComponent {\n @Input() state: string | undefined;\n\n constructor(private fusionAuth: FusionAuthService) {}\n\n login() {\n this.fusionAuth.startLogin(this.state);\n }\n}\n","<button class=\"fa-button\" (click)=\"login()\">\n <span>Login</span>\n</button>\n","import { Component } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n standalone: false,\n selector: 'fa-logout',\n templateUrl: './fusion-auth-logout-button.component.html',\n styleUrls: [\n '../fa-button.scss',\n './fusion-auth-logout-button.component.scss',\n ],\n})\nexport class FusionAuthLogoutButtonComponent {\n constructor(private fusionAuth: FusionAuthService) {}\n\n logout() {\n this.fusionAuth.logout();\n }\n}\n","<button class=\"fa-button\" (click)=\"logout()\">\n <span>Logout</span>\n</button>\n","import { Component, Input } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n standalone: false,\n selector: 'fa-register',\n templateUrl: './fusion-auth-register-button.component.html',\n styleUrls: [\n '../fa-button.scss',\n './fusion-auth-register-button.component.scss',\n ],\n})\nexport class FusionAuthRegisterButtonComponent {\n @Input() state: string | undefined;\n\n constructor(private fusionAuth: FusionAuthService) {}\n\n register() {\n this.fusionAuth.startRegistration(this.state);\n }\n}\n","<button class=\"fa-button\" (click)=\"register()\">\n <span>Register Now</span>\n</button>\n","import { Component } from '@angular/core';\nimport { FusionAuthService } from '../../fusion-auth.service';\n\n@Component({\n standalone: false,\n selector: 'fa-account',\n templateUrl: './fusion-auth-account-button.component.html',\n styleUrls: ['./fusion-auth-account-button.component.scss'],\n})\nexport class FusionAuthAccountButtonComponent {\n constructor(private fusionAuth: FusionAuthService) {}\n\n manageAccount() {\n this.fusionAuth.manageAccount();\n }\n}\n","<button class=\"fa-button\" (click)=\"manageAccount()\">\n <span>manage account</span>\n</button>\n","import { ModuleWithProviders, NgModule } from '@angular/core';\nimport { FusionAuthConfig } from './types';\nimport { FusionAuthService } from './fusion-auth.service';\nimport { FUSIONAUTH_SERVICE_CONFIG } from './injectionToken';\nimport { FusionAuthLoginButtonComponent } from './components/fusionauth-login.button/fusion-auth-login-button.component';\nimport { FusionAuthLogoutButtonComponent } from './components/fusionauth-logout.button/fusion-auth-logout-button.component';\nimport { FusionAuthRegisterButtonComponent } from './components/fusionauth-register.button/fusion-auth-register-button.component';\nimport { FusionAuthAccountButtonComponent } from './components/fusionauth-account.button/fusion-auth-account-button.component';\n\n@NgModule({\n declarations: [\n FusionAuthLoginButtonComponent,\n FusionAuthLogoutButtonComponent,\n FusionAuthRegisterButtonComponent,\n FusionAuthAccountButtonComponent,\n ],\n imports: [],\n exports: [\n FusionAuthLoginButtonComponent,\n FusionAuthLogoutButtonComponent,\n FusionAuthRegisterButtonComponent,\n FusionAuthAccountButtonComponent,\n ],\n})\nexport class FusionAuthModule {\n static forRoot(\n fusionAuthConfig: FusionAuthConfig,\n ): ModuleWithProviders<FusionAuthModule> {\n return {\n ngModule: FusionAuthModule,\n providers: [\n { provide: FUSIONAUTH_SERVICE_CONFIG, useValue: fusionAuthConfig },\n FusionAuthService,\n ],\n };\n }\n}\n","/*\n * Public API Surface of fusionauth-angular-sdk\n */\n\nexport * from './lib/fusion-auth.service';\nexport * from './lib/components/fusionauth-login.button/fusion-auth-login-button.component';\nexport * from './lib/components/fusionauth-logout.button/fusion-auth-logout-button.component';\nexport * from './lib/components/fusionauth-register.button/fusion-auth-register-button.component';\nexport * from './lib/components/fusionauth-account.button/fusion-auth-account-button.component';\nexport * from './lib/fusion-auth.module';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nex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A,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,iBAbzB,8BAA8B;YAC9B,+BAA+B;YAC/B,iCAAiC;AACjC,YAAA,gCAAgC,aAIhC,8BAA8B;YAC9B,+BAA+B;YAC/B,iCAAiC;YACjC,gCAAgC,CAAA,EAAA,CAAA,CAAA;+GAGvB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAf5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,8BAA8B;wBAC9B,+BAA+B;wBAC/B,iCAAiC;wBACjC,gCAAgC;AACjC,qBAAA;AACD,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,OAAO,EAAE;wBACP,8BAA8B;wBAC9B,+BAA+B;wBAC/B,iCAAiC;wBACjC,gCAAgC;AACjC,qBAAA;AACF,iBAAA;;;ACvBD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusionauth/angular-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": ">=
|
|
6
|
-
"@angular/core": ">=
|
|
5
|
+
"@angular/common": ">=22.0.0",
|
|
6
|
+
"@angular/core": ">=22.0.0"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"tslib": "^2.3.0"
|
|
10
10
|
},
|
|
11
11
|
"sideEffects": false,
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/FusionAuth/fusionauth-javascript-sdk"
|
|
15
|
+
},
|
|
16
|
+
"author": "FusionAuth",
|
|
17
|
+
"license": "Apache",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/FusionAuth/fusionauth-javascript-sdk/issues"
|
|
20
|
+
},
|
|
12
21
|
"module": "fesm2022/fusionauth-angular-sdk.mjs",
|
|
13
|
-
"typings": "
|
|
22
|
+
"typings": "types/fusionauth-angular-sdk.d.ts",
|
|
14
23
|
"exports": {
|
|
15
24
|
"./package.json": {
|
|
16
25
|
"default": "./package.json"
|
|
17
26
|
},
|
|
18
27
|
".": {
|
|
19
|
-
"types": "./
|
|
20
|
-
"esm2022": "./esm2022/fusionauth-angular-sdk.mjs",
|
|
21
|
-
"esm": "./esm2022/fusionauth-angular-sdk.mjs",
|
|
28
|
+
"types": "./types/fusionauth-angular-sdk.d.ts",
|
|
22
29
|
"default": "./fesm2022/fusionauth-angular-sdk.mjs"
|
|
23
30
|
}
|
|
24
|
-
}
|
|
31
|
+
},
|
|
32
|
+
"type": "module"
|
|
25
33
|
}
|