@asgardeo/node 0.0.1 → 0.0.3
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 +2 -2
- package/dist/AsgardeoNodeClient.d.ts +1 -1
- package/dist/__legacy__/client.d.ts +50 -43
- package/dist/__legacy__/core/authentication.d.ts +16 -15
- package/dist/__legacy__/stores/memory-cache-store.d.ts +2 -2
- package/dist/__legacy__/utils/crypto-utils.d.ts +1 -1
- package/dist/cjs/index.js +100 -86
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +100 -86
- package/dist/index.js.map +2 -2
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -163,11 +163,11 @@ var NodeCryptoUtils = class {
|
|
|
163
163
|
generateRandomBytes(length) {
|
|
164
164
|
return randombytes(length);
|
|
165
165
|
}
|
|
166
|
-
async verifyJwt(idToken, jwk, algorithms,
|
|
166
|
+
async verifyJwt(idToken, jwk, algorithms, clientId, issuer, subject, clockTolerance) {
|
|
167
167
|
const key = await jose.importJWK(jwk);
|
|
168
168
|
return jose.jwtVerify(idToken, key, {
|
|
169
169
|
algorithms,
|
|
170
|
-
audience:
|
|
170
|
+
audience: clientId,
|
|
171
171
|
clockTolerance,
|
|
172
172
|
issuer,
|
|
173
173
|
subject
|
|
@@ -183,7 +183,7 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
183
183
|
__publicField(this, "_auth");
|
|
184
184
|
__publicField(this, "_cryptoUtils");
|
|
185
185
|
__publicField(this, "_store");
|
|
186
|
-
__publicField(this, "
|
|
186
|
+
__publicField(this, "_storageManager");
|
|
187
187
|
if (!store) {
|
|
188
188
|
this._store = new MemoryCacheStore();
|
|
189
189
|
} else {
|
|
@@ -192,11 +192,11 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
192
192
|
this._cryptoUtils = new NodeCryptoUtils();
|
|
193
193
|
this._auth = new AsgardeoAuthClient();
|
|
194
194
|
this._auth.initialize(config, this._store, this._cryptoUtils);
|
|
195
|
-
this.
|
|
195
|
+
this._storageManager = this._auth.getStorageManager();
|
|
196
196
|
Logger.debug("Initialized AsgardeoAuthClient successfully");
|
|
197
197
|
}
|
|
198
|
-
async signIn(authURLCallback,
|
|
199
|
-
if (!
|
|
198
|
+
async signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig) {
|
|
199
|
+
if (!userId) {
|
|
200
200
|
return Promise.reject(
|
|
201
201
|
new AsgardeoAuthException(
|
|
202
202
|
"NODE-AUTH_CORE-SI-NF01",
|
|
@@ -205,8 +205,8 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
205
205
|
)
|
|
206
206
|
);
|
|
207
207
|
}
|
|
208
|
-
if (await this.
|
|
209
|
-
const sessionData = await this.
|
|
208
|
+
if (await this.isSignedIn(userId)) {
|
|
209
|
+
const sessionData = await this._storageManager.getSessionData(userId);
|
|
210
210
|
return Promise.resolve({
|
|
211
211
|
accessToken: sessionData.access_token,
|
|
212
212
|
createdAt: sessionData.created_at,
|
|
@@ -227,7 +227,7 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
227
227
|
)
|
|
228
228
|
);
|
|
229
229
|
}
|
|
230
|
-
const authURL = await this.getAuthURL(
|
|
230
|
+
const authURL = await this.getAuthURL(userId, signInConfig);
|
|
231
231
|
authURLCallback(authURL);
|
|
232
232
|
return Promise.resolve({
|
|
233
233
|
accessToken: "",
|
|
@@ -240,10 +240,10 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
240
240
|
tokenType: ""
|
|
241
241
|
});
|
|
242
242
|
}
|
|
243
|
-
return this.requestAccessToken(authorizationCode, sessionState ?? "",
|
|
243
|
+
return this.requestAccessToken(authorizationCode, sessionState ?? "", userId, state);
|
|
244
244
|
}
|
|
245
245
|
async getAuthURL(userId, signInConfig) {
|
|
246
|
-
const authURL = await this._auth.
|
|
246
|
+
const authURL = await this._auth.getSignInUrl(signInConfig, userId);
|
|
247
247
|
if (authURL) {
|
|
248
248
|
return Promise.resolve(authURL.toString());
|
|
249
249
|
} else {
|
|
@@ -259,8 +259,8 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
259
259
|
async requestAccessToken(authorizationCode, sessionState, userId, state) {
|
|
260
260
|
return this._auth.requestAccessToken(authorizationCode, sessionState, state, userId);
|
|
261
261
|
}
|
|
262
|
-
async
|
|
263
|
-
const is_logged_in = await this.
|
|
262
|
+
async getIdToken(userId) {
|
|
263
|
+
const is_logged_in = await this.isSignedIn(userId);
|
|
264
264
|
if (!is_logged_in) {
|
|
265
265
|
return Promise.reject(
|
|
266
266
|
new AsgardeoAuthException(
|
|
@@ -270,7 +270,7 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
270
270
|
)
|
|
271
271
|
);
|
|
272
272
|
}
|
|
273
|
-
const idToken = await this._auth.
|
|
273
|
+
const idToken = await this._auth.getIdToken(userId);
|
|
274
274
|
if (idToken) {
|
|
275
275
|
return Promise.resolve(idToken);
|
|
276
276
|
} else {
|
|
@@ -286,27 +286,27 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
286
286
|
async refreshAccessToken(userId) {
|
|
287
287
|
return this._auth.refreshAccessToken(userId);
|
|
288
288
|
}
|
|
289
|
-
async
|
|
289
|
+
async isSignedIn(userId) {
|
|
290
290
|
try {
|
|
291
|
-
if (!await this._auth.
|
|
291
|
+
if (!await this._auth.isSignedIn(userId)) {
|
|
292
292
|
return Promise.resolve(false);
|
|
293
293
|
}
|
|
294
|
-
if (await SessionUtils.validateSession(await this.
|
|
294
|
+
if (await SessionUtils.validateSession(await this._storageManager.getSessionData(userId))) {
|
|
295
295
|
return Promise.resolve(true);
|
|
296
296
|
}
|
|
297
297
|
const refreshed_token = await this.refreshAccessToken(userId);
|
|
298
298
|
if (refreshed_token) {
|
|
299
299
|
return Promise.resolve(true);
|
|
300
300
|
}
|
|
301
|
-
this.
|
|
302
|
-
this.
|
|
301
|
+
this._storageManager.removeSessionData(userId);
|
|
302
|
+
this._storageManager.getTemporaryData(userId);
|
|
303
303
|
return Promise.resolve(false);
|
|
304
304
|
} catch (error) {
|
|
305
305
|
return Promise.reject(error);
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
async signOut(userId) {
|
|
309
|
-
const signOutURL = await this._auth.
|
|
309
|
+
const signOutURL = await this._auth.getSignOutUrl(userId);
|
|
310
310
|
if (!signOutURL) {
|
|
311
311
|
return Promise.reject(
|
|
312
312
|
new AsgardeoAuthException(
|
|
@@ -318,35 +318,38 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
318
318
|
}
|
|
319
319
|
return Promise.resolve(signOutURL);
|
|
320
320
|
}
|
|
321
|
-
async
|
|
322
|
-
return this._auth.
|
|
321
|
+
async getUser(userId) {
|
|
322
|
+
return this._auth.getUser(userId);
|
|
323
|
+
}
|
|
324
|
+
async getConfigData() {
|
|
325
|
+
return this._storageManager.getConfigData();
|
|
323
326
|
}
|
|
324
|
-
async
|
|
325
|
-
return this._auth.
|
|
327
|
+
async getOpenIDProviderEndpoints() {
|
|
328
|
+
return this._auth.getOpenIDProviderEndpoints();
|
|
326
329
|
}
|
|
327
|
-
async
|
|
328
|
-
return this._auth.
|
|
330
|
+
async getDecodedIdToken(userId) {
|
|
331
|
+
return this._auth.getDecodedIdToken(userId);
|
|
329
332
|
}
|
|
330
333
|
async getAccessToken(userId) {
|
|
331
334
|
return this._auth.getAccessToken(userId);
|
|
332
335
|
}
|
|
333
|
-
async
|
|
334
|
-
return this._auth.
|
|
336
|
+
async exchangeToken(config, userId) {
|
|
337
|
+
return this._auth.exchangeToken(config, userId);
|
|
335
338
|
}
|
|
336
|
-
async
|
|
337
|
-
return this._auth.
|
|
339
|
+
async reInitialize(config) {
|
|
340
|
+
return this._auth.reInitialize(config);
|
|
338
341
|
}
|
|
339
342
|
async revokeAccessToken(userId) {
|
|
340
343
|
return this._auth.revokeAccessToken(userId);
|
|
341
344
|
}
|
|
342
|
-
static didSignOutFail(
|
|
343
|
-
return _AsgardeoNodeCore.didSignOutFail(
|
|
345
|
+
static didSignOutFail(afterSignOutUrl) {
|
|
346
|
+
return _AsgardeoNodeCore.didSignOutFail(afterSignOutUrl);
|
|
344
347
|
}
|
|
345
|
-
static isSignOutSuccessful(
|
|
346
|
-
return _AsgardeoNodeCore.isSignOutSuccessful(
|
|
348
|
+
static isSignOutSuccessful(afterSignOutUrl) {
|
|
349
|
+
return _AsgardeoNodeCore.isSignOutSuccessful(afterSignOutUrl);
|
|
347
350
|
}
|
|
348
|
-
|
|
349
|
-
return this.
|
|
351
|
+
getStorageManager() {
|
|
352
|
+
return this._storageManager;
|
|
350
353
|
}
|
|
351
354
|
};
|
|
352
355
|
|
|
@@ -356,15 +359,15 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
356
359
|
* This is the constructor method that returns an instance of the `AsgardeoNodeClient` class.
|
|
357
360
|
*
|
|
358
361
|
* @param {AuthClientConfig<T>} config - The configuration object.
|
|
359
|
-
* @param {
|
|
362
|
+
* @param {Storage} store - The store object.
|
|
360
363
|
*
|
|
361
364
|
* @example
|
|
362
365
|
* ```
|
|
363
|
-
* const _store:
|
|
366
|
+
* const _store: Storage = new DataStore();
|
|
364
367
|
* const _config = {
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
+
afterSignInUrl: "http://localhost:3000/sign-in",
|
|
369
|
+
afterSignOutUrl: "http://localhost:3000/dashboard",
|
|
370
|
+
clientId: "client ID",
|
|
368
371
|
serverOrigin: "https://api.asgardeo.io/t/<org_name>"
|
|
369
372
|
};
|
|
370
373
|
* const auth = new AsgardeoNodeClient(_config,_store);
|
|
@@ -385,7 +388,7 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
385
388
|
* authorization URL to authorize the user.
|
|
386
389
|
* @param {string} authorizationCode - The authorization code obtained from Asgardeo after a user signs in.
|
|
387
390
|
* @param {String} sessionState - The session state obtained from Asgardeo after a user signs in.
|
|
388
|
-
* @param {string}
|
|
391
|
+
* @param {string} userId - (Optional) A unique ID of the user to be authenticated. This is useful in multi-user
|
|
389
392
|
* scenarios where each user should be uniquely identified.
|
|
390
393
|
* @param {string} state - The state parameter in the redirect URL.
|
|
391
394
|
*
|
|
@@ -415,6 +418,14 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
415
418
|
async signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig) {
|
|
416
419
|
return this._authCore.signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig);
|
|
417
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* Method to get the configuration data.
|
|
423
|
+
*
|
|
424
|
+
* @returns {Promise<AuthClientConfig<Config>>} - A promise that resolves with the configuration data.
|
|
425
|
+
*/
|
|
426
|
+
async getConfigData() {
|
|
427
|
+
return this._authCore.getConfigData();
|
|
428
|
+
}
|
|
418
429
|
/**
|
|
419
430
|
* This method clears all session data and returns the sign-out URL.
|
|
420
431
|
* @param {string} userId - The userId of the user. (If you are using ExpressJS,
|
|
@@ -444,16 +455,16 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
444
455
|
*
|
|
445
456
|
* @example
|
|
446
457
|
* ```
|
|
447
|
-
* const isAuth = await authClient.
|
|
458
|
+
* const isAuth = await authClient.isSignedIn("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
448
459
|
* ```
|
|
449
460
|
*
|
|
450
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
461
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#isSignedIn
|
|
451
462
|
*
|
|
452
463
|
* @memberof AsgardeoNodeClient
|
|
453
464
|
*
|
|
454
465
|
*/
|
|
455
|
-
async
|
|
456
|
-
return this._authCore.
|
|
466
|
+
async isSignedIn(userId) {
|
|
467
|
+
return this._authCore.isSignedIn(userId);
|
|
457
468
|
}
|
|
458
469
|
/**
|
|
459
470
|
* This method returns the id token.
|
|
@@ -464,16 +475,16 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
464
475
|
*
|
|
465
476
|
* @example
|
|
466
477
|
* ```
|
|
467
|
-
* const isAuth = await authClient.
|
|
478
|
+
* const isAuth = await authClient.getIdToken("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
468
479
|
* ```
|
|
469
480
|
*
|
|
470
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
481
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getIdToken
|
|
471
482
|
*
|
|
472
483
|
* @memberof AsgardeoNodeClient
|
|
473
484
|
*
|
|
474
485
|
*/
|
|
475
|
-
async
|
|
476
|
-
return this._authCore.
|
|
486
|
+
async getIdToken(userId) {
|
|
487
|
+
return this._authCore.getIdToken(userId);
|
|
477
488
|
}
|
|
478
489
|
/**
|
|
479
490
|
* This method returns an object containing basic user information obtained from the id token.
|
|
@@ -485,16 +496,16 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
485
496
|
*
|
|
486
497
|
* @example
|
|
487
498
|
* ```
|
|
488
|
-
* const basicInfo = await authClient.
|
|
499
|
+
* const basicInfo = await authClient.getUser("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
489
500
|
* ```
|
|
490
501
|
*
|
|
491
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
502
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getUser
|
|
492
503
|
*
|
|
493
504
|
* @memberof AsgardeoNodeClient
|
|
494
505
|
*
|
|
495
506
|
*/
|
|
496
|
-
async
|
|
497
|
-
return this._authCore.
|
|
507
|
+
async getUser(userId) {
|
|
508
|
+
return this._authCore.getUser(userId);
|
|
498
509
|
}
|
|
499
510
|
/**
|
|
500
511
|
* This method returns an object containing the OIDC service endpoints returned by the `.well-known` endpoint.
|
|
@@ -503,37 +514,37 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
503
514
|
*
|
|
504
515
|
* @example
|
|
505
516
|
* ```
|
|
506
|
-
* const oidcEndpoints = await auth.
|
|
517
|
+
* const oidcEndpoints = await auth.getOpenIDProviderEndpoints();
|
|
507
518
|
* ```
|
|
508
519
|
*
|
|
509
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
520
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getOpenIDProviderEndpoints
|
|
510
521
|
*
|
|
511
522
|
* @memberof AsgardeoNodeClient
|
|
512
523
|
*
|
|
513
524
|
*/
|
|
514
|
-
async
|
|
515
|
-
return this._authCore.
|
|
525
|
+
async getOpenIDProviderEndpoints() {
|
|
526
|
+
return this._authCore.getOpenIDProviderEndpoints();
|
|
516
527
|
}
|
|
517
528
|
/**
|
|
518
529
|
* This method returns the decoded ID token payload.
|
|
519
530
|
* @param {string} userId - The userId of the user.
|
|
520
531
|
* (If you are using ExpressJS, you may get this from the request cookies)
|
|
521
532
|
*
|
|
522
|
-
* @return {Promise<
|
|
533
|
+
* @return {Promise<IdToken>} -A Promise that resolves with
|
|
523
534
|
* an object containing the decoded ID token payload.
|
|
524
535
|
*
|
|
525
536
|
* @example
|
|
526
537
|
* ```
|
|
527
|
-
* const decodedIDTokenPayload = await auth.
|
|
538
|
+
* const decodedIDTokenPayload = await auth.getDecodedIdToken("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
528
539
|
* ```
|
|
529
540
|
*
|
|
530
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
541
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getDecodedIdToken
|
|
531
542
|
*
|
|
532
543
|
* @memberof AsgardeoNodeClient
|
|
533
544
|
*
|
|
534
545
|
*/
|
|
535
|
-
async
|
|
536
|
-
return this._authCore.
|
|
546
|
+
async getDecodedIdToken(userId) {
|
|
547
|
+
return this._authCore.getDecodedIdToken(userId);
|
|
537
548
|
}
|
|
538
549
|
/**
|
|
539
550
|
* This method returns the access token.
|
|
@@ -557,15 +568,15 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
557
568
|
return this._authCore.getAccessToken(userId);
|
|
558
569
|
}
|
|
559
570
|
/**
|
|
560
|
-
* This method returns Promise that resolves with the token information
|
|
571
|
+
* This method returns Promise that resolves with the token information
|
|
561
572
|
* or the response returned by the server depending on the configuration passed.
|
|
562
|
-
* @param {
|
|
573
|
+
* @param {TokenExchangeRequestConfig} config - The config object contains attributes that would be used
|
|
563
574
|
* to configure the custom grant request.
|
|
564
575
|
*
|
|
565
576
|
* @param {string} userId - The userId of the user.
|
|
566
577
|
* (If you are using ExpressJS, you may get this from the request cookies)
|
|
567
|
-
*
|
|
568
|
-
* @return {Promise<TokenResponse |
|
|
578
|
+
*
|
|
579
|
+
* @return {Promise<TokenResponse | Response>} -A Promise that resolves with the token information
|
|
569
580
|
* or the response returned by the server depending on the configuration passed.
|
|
570
581
|
*
|
|
571
582
|
* @example
|
|
@@ -573,7 +584,7 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
573
584
|
* const config = {
|
|
574
585
|
* attachToken: false,
|
|
575
586
|
* data: {
|
|
576
|
-
* client_id: "{{
|
|
587
|
+
* client_id: "{{clientId}}",
|
|
577
588
|
* grant_type: "account_switch",
|
|
578
589
|
* scope: "{{scope}}",
|
|
579
590
|
* token: "{{token}}",
|
|
@@ -584,20 +595,20 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
584
595
|
* signInRequired: true
|
|
585
596
|
* }
|
|
586
597
|
|
|
587
|
-
* auth.
|
|
598
|
+
* auth.exchangeToken(config).then((response)=>{
|
|
588
599
|
* console.log(response);
|
|
589
600
|
* }).catch((error)=>{
|
|
590
601
|
* console.error(error);
|
|
591
602
|
* });
|
|
592
603
|
* ```
|
|
593
604
|
*
|
|
594
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
605
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#exchangeToken
|
|
595
606
|
*
|
|
596
607
|
* @memberof AsgardeoNodeClient
|
|
597
608
|
*
|
|
598
609
|
*/
|
|
599
|
-
async
|
|
600
|
-
return this._authCore.
|
|
610
|
+
async exchangeToken(config, userId) {
|
|
611
|
+
return this._authCore.exchangeToken(config, userId);
|
|
601
612
|
}
|
|
602
613
|
/**
|
|
603
614
|
* This method can be used to update the configurations passed into the constructor of the AsgardeoAuthClient.
|
|
@@ -608,25 +619,28 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
608
619
|
*
|
|
609
620
|
* @example
|
|
610
621
|
* ```
|
|
611
|
-
* const
|
|
612
|
-
*
|
|
622
|
+
* const reInitialize = await auth.reInitialize({
|
|
623
|
+
* afterSignOutUrl: "http://localhost:3000/sign-out"
|
|
613
624
|
* });
|
|
614
625
|
* ```
|
|
615
626
|
*
|
|
616
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
627
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#reInitialize
|
|
617
628
|
*
|
|
618
629
|
* @memberof AsgardeoNodeClient
|
|
619
630
|
*
|
|
620
631
|
*/
|
|
621
|
-
async
|
|
622
|
-
return this._authCore.
|
|
632
|
+
async reInitialize(config) {
|
|
633
|
+
return this._authCore.reInitialize(config);
|
|
634
|
+
}
|
|
635
|
+
async getSignInUrl(requestConfig, userId) {
|
|
636
|
+
return this._authCore.getAuthURL(userId, requestConfig);
|
|
623
637
|
}
|
|
624
638
|
/**
|
|
625
639
|
* This method returns a Promise that resolves with the response returned by the server.
|
|
626
640
|
* @param {string} userId - The userId of the user.
|
|
627
641
|
* (If you are using ExpressJS, you may get this from the request cookies)
|
|
628
642
|
*
|
|
629
|
-
* @return {Promise<
|
|
643
|
+
* @return {Promise<Response>} -A Promise that resolves with the response returned by the server.
|
|
630
644
|
*
|
|
631
645
|
* @example
|
|
632
646
|
* ```
|
|
@@ -664,7 +678,7 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
664
678
|
}
|
|
665
679
|
/**
|
|
666
680
|
* This method returns if the user has been successfully signed out or not.
|
|
667
|
-
* @param {string}
|
|
681
|
+
* @param {string} afterSignOutUrl - The URL to which the user is redirected to
|
|
668
682
|
* after signing out from the server.
|
|
669
683
|
*
|
|
670
684
|
* @return {boolean} - A boolean value indicating if the user has been signed out or not.
|
|
@@ -679,12 +693,12 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
679
693
|
* @memberof AsgardeoNodeClient
|
|
680
694
|
*
|
|
681
695
|
*/
|
|
682
|
-
static isSignOutSuccessful(
|
|
683
|
-
return _AsgardeoNodeClient.isSignOutSuccessful(
|
|
696
|
+
static isSignOutSuccessful(afterSignOutUrl) {
|
|
697
|
+
return _AsgardeoNodeClient.isSignOutSuccessful(afterSignOutUrl);
|
|
684
698
|
}
|
|
685
699
|
/**
|
|
686
700
|
* This method returns if sign-out failed or not
|
|
687
|
-
* @param {string}
|
|
701
|
+
* @param {string} afterSignOutUrl - The URL to which the user is redirected to
|
|
688
702
|
* after signing out from the server.
|
|
689
703
|
*
|
|
690
704
|
* @return {boolean} - A boolean value indicating if sign-out failed or not.
|
|
@@ -699,11 +713,11 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
699
713
|
* @memberof AsgardeoNodeClient
|
|
700
714
|
*
|
|
701
715
|
*/
|
|
702
|
-
static didSignOutFail(
|
|
703
|
-
return _AsgardeoNodeClient.didSignOutFail(
|
|
716
|
+
static didSignOutFail(afterSignOutUrl) {
|
|
717
|
+
return _AsgardeoNodeClient.didSignOutFail(afterSignOutUrl);
|
|
704
718
|
}
|
|
705
|
-
async
|
|
706
|
-
return this._authCore.
|
|
719
|
+
async getStorageManager() {
|
|
720
|
+
return this._authCore.getStorageManager();
|
|
707
721
|
}
|
|
708
722
|
};
|
|
709
723
|
|