@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/cjs/index.js
CHANGED
|
@@ -197,11 +197,11 @@ var NodeCryptoUtils = class {
|
|
|
197
197
|
generateRandomBytes(length) {
|
|
198
198
|
return (0, import_secure_random_bytes.default)(length);
|
|
199
199
|
}
|
|
200
|
-
async verifyJwt(idToken, jwk, algorithms,
|
|
200
|
+
async verifyJwt(idToken, jwk, algorithms, clientId, issuer, subject, clockTolerance) {
|
|
201
201
|
const key = await jose.importJWK(jwk);
|
|
202
202
|
return jose.jwtVerify(idToken, key, {
|
|
203
203
|
algorithms,
|
|
204
|
-
audience:
|
|
204
|
+
audience: clientId,
|
|
205
205
|
clockTolerance,
|
|
206
206
|
issuer,
|
|
207
207
|
subject
|
|
@@ -217,7 +217,7 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
217
217
|
__publicField(this, "_auth");
|
|
218
218
|
__publicField(this, "_cryptoUtils");
|
|
219
219
|
__publicField(this, "_store");
|
|
220
|
-
__publicField(this, "
|
|
220
|
+
__publicField(this, "_storageManager");
|
|
221
221
|
if (!store) {
|
|
222
222
|
this._store = new MemoryCacheStore();
|
|
223
223
|
} else {
|
|
@@ -226,11 +226,11 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
226
226
|
this._cryptoUtils = new NodeCryptoUtils();
|
|
227
227
|
this._auth = new import_javascript.AsgardeoAuthClient();
|
|
228
228
|
this._auth.initialize(config, this._store, this._cryptoUtils);
|
|
229
|
-
this.
|
|
229
|
+
this._storageManager = this._auth.getStorageManager();
|
|
230
230
|
Logger.debug("Initialized AsgardeoAuthClient successfully");
|
|
231
231
|
}
|
|
232
|
-
async signIn(authURLCallback,
|
|
233
|
-
if (!
|
|
232
|
+
async signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig) {
|
|
233
|
+
if (!userId) {
|
|
234
234
|
return Promise.reject(
|
|
235
235
|
new import_javascript.AsgardeoAuthException(
|
|
236
236
|
"NODE-AUTH_CORE-SI-NF01",
|
|
@@ -239,8 +239,8 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
239
239
|
)
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
if (await this.
|
|
243
|
-
const sessionData = await this.
|
|
242
|
+
if (await this.isSignedIn(userId)) {
|
|
243
|
+
const sessionData = await this._storageManager.getSessionData(userId);
|
|
244
244
|
return Promise.resolve({
|
|
245
245
|
accessToken: sessionData.access_token,
|
|
246
246
|
createdAt: sessionData.created_at,
|
|
@@ -261,7 +261,7 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
261
261
|
)
|
|
262
262
|
);
|
|
263
263
|
}
|
|
264
|
-
const authURL = await this.getAuthURL(
|
|
264
|
+
const authURL = await this.getAuthURL(userId, signInConfig);
|
|
265
265
|
authURLCallback(authURL);
|
|
266
266
|
return Promise.resolve({
|
|
267
267
|
accessToken: "",
|
|
@@ -274,10 +274,10 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
274
274
|
tokenType: ""
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
return this.requestAccessToken(authorizationCode, sessionState ?? "",
|
|
277
|
+
return this.requestAccessToken(authorizationCode, sessionState ?? "", userId, state);
|
|
278
278
|
}
|
|
279
279
|
async getAuthURL(userId, signInConfig) {
|
|
280
|
-
const authURL = await this._auth.
|
|
280
|
+
const authURL = await this._auth.getSignInUrl(signInConfig, userId);
|
|
281
281
|
if (authURL) {
|
|
282
282
|
return Promise.resolve(authURL.toString());
|
|
283
283
|
} else {
|
|
@@ -293,8 +293,8 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
293
293
|
async requestAccessToken(authorizationCode, sessionState, userId, state) {
|
|
294
294
|
return this._auth.requestAccessToken(authorizationCode, sessionState, state, userId);
|
|
295
295
|
}
|
|
296
|
-
async
|
|
297
|
-
const is_logged_in = await this.
|
|
296
|
+
async getIdToken(userId) {
|
|
297
|
+
const is_logged_in = await this.isSignedIn(userId);
|
|
298
298
|
if (!is_logged_in) {
|
|
299
299
|
return Promise.reject(
|
|
300
300
|
new import_javascript.AsgardeoAuthException(
|
|
@@ -304,7 +304,7 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
304
304
|
)
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
|
-
const idToken = await this._auth.
|
|
307
|
+
const idToken = await this._auth.getIdToken(userId);
|
|
308
308
|
if (idToken) {
|
|
309
309
|
return Promise.resolve(idToken);
|
|
310
310
|
} else {
|
|
@@ -320,27 +320,27 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
320
320
|
async refreshAccessToken(userId) {
|
|
321
321
|
return this._auth.refreshAccessToken(userId);
|
|
322
322
|
}
|
|
323
|
-
async
|
|
323
|
+
async isSignedIn(userId) {
|
|
324
324
|
try {
|
|
325
|
-
if (!await this._auth.
|
|
325
|
+
if (!await this._auth.isSignedIn(userId)) {
|
|
326
326
|
return Promise.resolve(false);
|
|
327
327
|
}
|
|
328
|
-
if (await SessionUtils.validateSession(await this.
|
|
328
|
+
if (await SessionUtils.validateSession(await this._storageManager.getSessionData(userId))) {
|
|
329
329
|
return Promise.resolve(true);
|
|
330
330
|
}
|
|
331
331
|
const refreshed_token = await this.refreshAccessToken(userId);
|
|
332
332
|
if (refreshed_token) {
|
|
333
333
|
return Promise.resolve(true);
|
|
334
334
|
}
|
|
335
|
-
this.
|
|
336
|
-
this.
|
|
335
|
+
this._storageManager.removeSessionData(userId);
|
|
336
|
+
this._storageManager.getTemporaryData(userId);
|
|
337
337
|
return Promise.resolve(false);
|
|
338
338
|
} catch (error) {
|
|
339
339
|
return Promise.reject(error);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
async signOut(userId) {
|
|
343
|
-
const signOutURL = await this._auth.
|
|
343
|
+
const signOutURL = await this._auth.getSignOutUrl(userId);
|
|
344
344
|
if (!signOutURL) {
|
|
345
345
|
return Promise.reject(
|
|
346
346
|
new import_javascript.AsgardeoAuthException(
|
|
@@ -352,35 +352,38 @@ var AsgardeoNodeCore = class _AsgardeoNodeCore {
|
|
|
352
352
|
}
|
|
353
353
|
return Promise.resolve(signOutURL);
|
|
354
354
|
}
|
|
355
|
-
async
|
|
356
|
-
return this._auth.
|
|
355
|
+
async getUser(userId) {
|
|
356
|
+
return this._auth.getUser(userId);
|
|
357
|
+
}
|
|
358
|
+
async getConfigData() {
|
|
359
|
+
return this._storageManager.getConfigData();
|
|
357
360
|
}
|
|
358
|
-
async
|
|
359
|
-
return this._auth.
|
|
361
|
+
async getOpenIDProviderEndpoints() {
|
|
362
|
+
return this._auth.getOpenIDProviderEndpoints();
|
|
360
363
|
}
|
|
361
|
-
async
|
|
362
|
-
return this._auth.
|
|
364
|
+
async getDecodedIdToken(userId) {
|
|
365
|
+
return this._auth.getDecodedIdToken(userId);
|
|
363
366
|
}
|
|
364
367
|
async getAccessToken(userId) {
|
|
365
368
|
return this._auth.getAccessToken(userId);
|
|
366
369
|
}
|
|
367
|
-
async
|
|
368
|
-
return this._auth.
|
|
370
|
+
async exchangeToken(config, userId) {
|
|
371
|
+
return this._auth.exchangeToken(config, userId);
|
|
369
372
|
}
|
|
370
|
-
async
|
|
371
|
-
return this._auth.
|
|
373
|
+
async reInitialize(config) {
|
|
374
|
+
return this._auth.reInitialize(config);
|
|
372
375
|
}
|
|
373
376
|
async revokeAccessToken(userId) {
|
|
374
377
|
return this._auth.revokeAccessToken(userId);
|
|
375
378
|
}
|
|
376
|
-
static didSignOutFail(
|
|
377
|
-
return _AsgardeoNodeCore.didSignOutFail(
|
|
379
|
+
static didSignOutFail(afterSignOutUrl) {
|
|
380
|
+
return _AsgardeoNodeCore.didSignOutFail(afterSignOutUrl);
|
|
378
381
|
}
|
|
379
|
-
static isSignOutSuccessful(
|
|
380
|
-
return _AsgardeoNodeCore.isSignOutSuccessful(
|
|
382
|
+
static isSignOutSuccessful(afterSignOutUrl) {
|
|
383
|
+
return _AsgardeoNodeCore.isSignOutSuccessful(afterSignOutUrl);
|
|
381
384
|
}
|
|
382
|
-
|
|
383
|
-
return this.
|
|
385
|
+
getStorageManager() {
|
|
386
|
+
return this._storageManager;
|
|
384
387
|
}
|
|
385
388
|
};
|
|
386
389
|
|
|
@@ -390,15 +393,15 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
390
393
|
* This is the constructor method that returns an instance of the `AsgardeoNodeClient` class.
|
|
391
394
|
*
|
|
392
395
|
* @param {AuthClientConfig<T>} config - The configuration object.
|
|
393
|
-
* @param {
|
|
396
|
+
* @param {Storage} store - The store object.
|
|
394
397
|
*
|
|
395
398
|
* @example
|
|
396
399
|
* ```
|
|
397
|
-
* const _store:
|
|
400
|
+
* const _store: Storage = new DataStore();
|
|
398
401
|
* const _config = {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
+
afterSignInUrl: "http://localhost:3000/sign-in",
|
|
403
|
+
afterSignOutUrl: "http://localhost:3000/dashboard",
|
|
404
|
+
clientId: "client ID",
|
|
402
405
|
serverOrigin: "https://api.asgardeo.io/t/<org_name>"
|
|
403
406
|
};
|
|
404
407
|
* const auth = new AsgardeoNodeClient(_config,_store);
|
|
@@ -419,7 +422,7 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
419
422
|
* authorization URL to authorize the user.
|
|
420
423
|
* @param {string} authorizationCode - The authorization code obtained from Asgardeo after a user signs in.
|
|
421
424
|
* @param {String} sessionState - The session state obtained from Asgardeo after a user signs in.
|
|
422
|
-
* @param {string}
|
|
425
|
+
* @param {string} userId - (Optional) A unique ID of the user to be authenticated. This is useful in multi-user
|
|
423
426
|
* scenarios where each user should be uniquely identified.
|
|
424
427
|
* @param {string} state - The state parameter in the redirect URL.
|
|
425
428
|
*
|
|
@@ -449,6 +452,14 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
449
452
|
async signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig) {
|
|
450
453
|
return this._authCore.signIn(authURLCallback, userId, authorizationCode, sessionState, state, signInConfig);
|
|
451
454
|
}
|
|
455
|
+
/**
|
|
456
|
+
* Method to get the configuration data.
|
|
457
|
+
*
|
|
458
|
+
* @returns {Promise<AuthClientConfig<Config>>} - A promise that resolves with the configuration data.
|
|
459
|
+
*/
|
|
460
|
+
async getConfigData() {
|
|
461
|
+
return this._authCore.getConfigData();
|
|
462
|
+
}
|
|
452
463
|
/**
|
|
453
464
|
* This method clears all session data and returns the sign-out URL.
|
|
454
465
|
* @param {string} userId - The userId of the user. (If you are using ExpressJS,
|
|
@@ -478,16 +489,16 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
478
489
|
*
|
|
479
490
|
* @example
|
|
480
491
|
* ```
|
|
481
|
-
* const isAuth = await authClient.
|
|
492
|
+
* const isAuth = await authClient.isSignedIn("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
482
493
|
* ```
|
|
483
494
|
*
|
|
484
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
495
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#isSignedIn
|
|
485
496
|
*
|
|
486
497
|
* @memberof AsgardeoNodeClient
|
|
487
498
|
*
|
|
488
499
|
*/
|
|
489
|
-
async
|
|
490
|
-
return this._authCore.
|
|
500
|
+
async isSignedIn(userId) {
|
|
501
|
+
return this._authCore.isSignedIn(userId);
|
|
491
502
|
}
|
|
492
503
|
/**
|
|
493
504
|
* This method returns the id token.
|
|
@@ -498,16 +509,16 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
498
509
|
*
|
|
499
510
|
* @example
|
|
500
511
|
* ```
|
|
501
|
-
* const isAuth = await authClient.
|
|
512
|
+
* const isAuth = await authClient.getIdToken("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
502
513
|
* ```
|
|
503
514
|
*
|
|
504
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
515
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getIdToken
|
|
505
516
|
*
|
|
506
517
|
* @memberof AsgardeoNodeClient
|
|
507
518
|
*
|
|
508
519
|
*/
|
|
509
|
-
async
|
|
510
|
-
return this._authCore.
|
|
520
|
+
async getIdToken(userId) {
|
|
521
|
+
return this._authCore.getIdToken(userId);
|
|
511
522
|
}
|
|
512
523
|
/**
|
|
513
524
|
* This method returns an object containing basic user information obtained from the id token.
|
|
@@ -519,16 +530,16 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
519
530
|
*
|
|
520
531
|
* @example
|
|
521
532
|
* ```
|
|
522
|
-
* const basicInfo = await authClient.
|
|
533
|
+
* const basicInfo = await authClient.getUser("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
523
534
|
* ```
|
|
524
535
|
*
|
|
525
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
536
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getUser
|
|
526
537
|
*
|
|
527
538
|
* @memberof AsgardeoNodeClient
|
|
528
539
|
*
|
|
529
540
|
*/
|
|
530
|
-
async
|
|
531
|
-
return this._authCore.
|
|
541
|
+
async getUser(userId) {
|
|
542
|
+
return this._authCore.getUser(userId);
|
|
532
543
|
}
|
|
533
544
|
/**
|
|
534
545
|
* This method returns an object containing the OIDC service endpoints returned by the `.well-known` endpoint.
|
|
@@ -537,37 +548,37 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
537
548
|
*
|
|
538
549
|
* @example
|
|
539
550
|
* ```
|
|
540
|
-
* const oidcEndpoints = await auth.
|
|
551
|
+
* const oidcEndpoints = await auth.getOpenIDProviderEndpoints();
|
|
541
552
|
* ```
|
|
542
553
|
*
|
|
543
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
554
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getOpenIDProviderEndpoints
|
|
544
555
|
*
|
|
545
556
|
* @memberof AsgardeoNodeClient
|
|
546
557
|
*
|
|
547
558
|
*/
|
|
548
|
-
async
|
|
549
|
-
return this._authCore.
|
|
559
|
+
async getOpenIDProviderEndpoints() {
|
|
560
|
+
return this._authCore.getOpenIDProviderEndpoints();
|
|
550
561
|
}
|
|
551
562
|
/**
|
|
552
563
|
* This method returns the decoded ID token payload.
|
|
553
564
|
* @param {string} userId - The userId of the user.
|
|
554
565
|
* (If you are using ExpressJS, you may get this from the request cookies)
|
|
555
566
|
*
|
|
556
|
-
* @return {Promise<
|
|
567
|
+
* @return {Promise<IdToken>} -A Promise that resolves with
|
|
557
568
|
* an object containing the decoded ID token payload.
|
|
558
569
|
*
|
|
559
570
|
* @example
|
|
560
571
|
* ```
|
|
561
|
-
* const decodedIDTokenPayload = await auth.
|
|
572
|
+
* const decodedIDTokenPayload = await auth.getDecodedIdToken("a2a2972c-51cd-5e9d-a9ae-058fae9f7927");
|
|
562
573
|
* ```
|
|
563
574
|
*
|
|
564
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
575
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#getDecodedIdToken
|
|
565
576
|
*
|
|
566
577
|
* @memberof AsgardeoNodeClient
|
|
567
578
|
*
|
|
568
579
|
*/
|
|
569
|
-
async
|
|
570
|
-
return this._authCore.
|
|
580
|
+
async getDecodedIdToken(userId) {
|
|
581
|
+
return this._authCore.getDecodedIdToken(userId);
|
|
571
582
|
}
|
|
572
583
|
/**
|
|
573
584
|
* This method returns the access token.
|
|
@@ -591,15 +602,15 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
591
602
|
return this._authCore.getAccessToken(userId);
|
|
592
603
|
}
|
|
593
604
|
/**
|
|
594
|
-
* This method returns Promise that resolves with the token information
|
|
605
|
+
* This method returns Promise that resolves with the token information
|
|
595
606
|
* or the response returned by the server depending on the configuration passed.
|
|
596
|
-
* @param {
|
|
607
|
+
* @param {TokenExchangeRequestConfig} config - The config object contains attributes that would be used
|
|
597
608
|
* to configure the custom grant request.
|
|
598
609
|
*
|
|
599
610
|
* @param {string} userId - The userId of the user.
|
|
600
611
|
* (If you are using ExpressJS, you may get this from the request cookies)
|
|
601
|
-
*
|
|
602
|
-
* @return {Promise<TokenResponse |
|
|
612
|
+
*
|
|
613
|
+
* @return {Promise<TokenResponse | Response>} -A Promise that resolves with the token information
|
|
603
614
|
* or the response returned by the server depending on the configuration passed.
|
|
604
615
|
*
|
|
605
616
|
* @example
|
|
@@ -607,7 +618,7 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
607
618
|
* const config = {
|
|
608
619
|
* attachToken: false,
|
|
609
620
|
* data: {
|
|
610
|
-
* client_id: "{{
|
|
621
|
+
* client_id: "{{clientId}}",
|
|
611
622
|
* grant_type: "account_switch",
|
|
612
623
|
* scope: "{{scope}}",
|
|
613
624
|
* token: "{{token}}",
|
|
@@ -618,20 +629,20 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
618
629
|
* signInRequired: true
|
|
619
630
|
* }
|
|
620
631
|
|
|
621
|
-
* auth.
|
|
632
|
+
* auth.exchangeToken(config).then((response)=>{
|
|
622
633
|
* console.log(response);
|
|
623
634
|
* }).catch((error)=>{
|
|
624
635
|
* console.error(error);
|
|
625
636
|
* });
|
|
626
637
|
* ```
|
|
627
638
|
*
|
|
628
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
639
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#exchangeToken
|
|
629
640
|
*
|
|
630
641
|
* @memberof AsgardeoNodeClient
|
|
631
642
|
*
|
|
632
643
|
*/
|
|
633
|
-
async
|
|
634
|
-
return this._authCore.
|
|
644
|
+
async exchangeToken(config, userId) {
|
|
645
|
+
return this._authCore.exchangeToken(config, userId);
|
|
635
646
|
}
|
|
636
647
|
/**
|
|
637
648
|
* This method can be used to update the configurations passed into the constructor of the AsgardeoAuthClient.
|
|
@@ -642,25 +653,28 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
642
653
|
*
|
|
643
654
|
* @example
|
|
644
655
|
* ```
|
|
645
|
-
* const
|
|
646
|
-
*
|
|
656
|
+
* const reInitialize = await auth.reInitialize({
|
|
657
|
+
* afterSignOutUrl: "http://localhost:3000/sign-out"
|
|
647
658
|
* });
|
|
648
659
|
* ```
|
|
649
660
|
*
|
|
650
|
-
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#
|
|
661
|
+
* @link https://github.com/asgardeo/asgardeo-auth-js-sdk/tree/master#reInitialize
|
|
651
662
|
*
|
|
652
663
|
* @memberof AsgardeoNodeClient
|
|
653
664
|
*
|
|
654
665
|
*/
|
|
655
|
-
async
|
|
656
|
-
return this._authCore.
|
|
666
|
+
async reInitialize(config) {
|
|
667
|
+
return this._authCore.reInitialize(config);
|
|
668
|
+
}
|
|
669
|
+
async getSignInUrl(requestConfig, userId) {
|
|
670
|
+
return this._authCore.getAuthURL(userId, requestConfig);
|
|
657
671
|
}
|
|
658
672
|
/**
|
|
659
673
|
* This method returns a Promise that resolves with the response returned by the server.
|
|
660
674
|
* @param {string} userId - The userId of the user.
|
|
661
675
|
* (If you are using ExpressJS, you may get this from the request cookies)
|
|
662
676
|
*
|
|
663
|
-
* @return {Promise<
|
|
677
|
+
* @return {Promise<Response>} -A Promise that resolves with the response returned by the server.
|
|
664
678
|
*
|
|
665
679
|
* @example
|
|
666
680
|
* ```
|
|
@@ -698,7 +712,7 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
698
712
|
}
|
|
699
713
|
/**
|
|
700
714
|
* This method returns if the user has been successfully signed out or not.
|
|
701
|
-
* @param {string}
|
|
715
|
+
* @param {string} afterSignOutUrl - The URL to which the user is redirected to
|
|
702
716
|
* after signing out from the server.
|
|
703
717
|
*
|
|
704
718
|
* @return {boolean} - A boolean value indicating if the user has been signed out or not.
|
|
@@ -713,12 +727,12 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
713
727
|
* @memberof AsgardeoNodeClient
|
|
714
728
|
*
|
|
715
729
|
*/
|
|
716
|
-
static isSignOutSuccessful(
|
|
717
|
-
return _AsgardeoNodeClient.isSignOutSuccessful(
|
|
730
|
+
static isSignOutSuccessful(afterSignOutUrl) {
|
|
731
|
+
return _AsgardeoNodeClient.isSignOutSuccessful(afterSignOutUrl);
|
|
718
732
|
}
|
|
719
733
|
/**
|
|
720
734
|
* This method returns if sign-out failed or not
|
|
721
|
-
* @param {string}
|
|
735
|
+
* @param {string} afterSignOutUrl - The URL to which the user is redirected to
|
|
722
736
|
* after signing out from the server.
|
|
723
737
|
*
|
|
724
738
|
* @return {boolean} - A boolean value indicating if sign-out failed or not.
|
|
@@ -733,11 +747,11 @@ var AsgardeoNodeClient = class _AsgardeoNodeClient {
|
|
|
733
747
|
* @memberof AsgardeoNodeClient
|
|
734
748
|
*
|
|
735
749
|
*/
|
|
736
|
-
static didSignOutFail(
|
|
737
|
-
return _AsgardeoNodeClient.didSignOutFail(
|
|
750
|
+
static didSignOutFail(afterSignOutUrl) {
|
|
751
|
+
return _AsgardeoNodeClient.didSignOutFail(afterSignOutUrl);
|
|
738
752
|
}
|
|
739
|
-
async
|
|
740
|
-
return this._authCore.
|
|
753
|
+
async getStorageManager() {
|
|
754
|
+
return this._authCore.getStorageManager();
|
|
741
755
|
}
|
|
742
756
|
};
|
|
743
757
|
|