@openpass/openpass-js-sdk
Advanced tools
Comparing version 4.4.1 to 4.4.2
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
@@ -61,2 +61,3 @@ "use strict"; | ||
const accessToken = responseJson.access_token; | ||
const refreshToken = responseJson.refresh_token; | ||
// this should not typically happen, but just in case... | ||
@@ -70,2 +71,3 @@ if (!accessToken) { | ||
accessToken, | ||
refreshToken, | ||
rawAccessToken: accessToken, | ||
@@ -72,0 +74,0 @@ tokenType: responseJson.token_type, |
@@ -59,2 +59,3 @@ "use strict"; | ||
rawAccessToken: deviceTokenResponse.tokensResponse.access_token, | ||
refreshToken: deviceTokenResponse.tokensResponse.refresh_token, | ||
tokenType: deviceTokenResponse.tokensResponse.token_type, | ||
@@ -61,0 +62,0 @@ expiresIn: deviceTokenResponse.tokensResponse.expires_in, |
@@ -130,3 +130,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const { idToken, rawIdToken, rawAccessToken, expiresIn, tokenType } = tokens; | ||
const { idToken, rawIdToken, rawAccessToken, refreshToken, expiresIn, tokenType } = tokens; | ||
return new Promise((resolve, reject) => { | ||
@@ -147,2 +147,3 @@ //wait for identity to be set before closing the popup | ||
rawAccessToken: rawAccessToken, | ||
refreshToken: refreshToken, | ||
expiresIn: expiresIn, | ||
@@ -149,0 +150,0 @@ tokenType: tokenType, |
@@ -89,3 +89,3 @@ "use strict"; | ||
const tokens = yield this.openPassApiClient.exchangeAuthCodeForTokens(redirectParams.code, authSession); | ||
const { idToken, rawIdToken, accessToken, tokenType, expiresIn } = tokens; | ||
const { idToken, rawIdToken, accessToken, refreshToken, tokenType, expiresIn } = tokens; | ||
return { | ||
@@ -98,2 +98,3 @@ clientState: authSession.clientState, | ||
rawAccessToken: accessToken, | ||
refreshToken: refreshToken, | ||
tokenType: tokenType, | ||
@@ -100,0 +101,0 @@ expiresIn: expiresIn, |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
@@ -58,2 +58,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const accessToken = responseJson.access_token; | ||
const refreshToken = responseJson.refresh_token; | ||
// this should not typically happen, but just in case... | ||
@@ -67,2 +68,3 @@ if (!accessToken) { | ||
accessToken, | ||
refreshToken, | ||
rawAccessToken: accessToken, | ||
@@ -69,0 +71,0 @@ tokenType: responseJson.token_type, |
@@ -57,2 +57,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
rawAccessToken: deviceTokenResponse.tokensResponse.access_token, | ||
refreshToken: deviceTokenResponse.tokensResponse.refresh_token, | ||
tokenType: deviceTokenResponse.tokensResponse.token_type, | ||
@@ -59,0 +60,0 @@ expiresIn: deviceTokenResponse.tokensResponse.expires_in, |
@@ -125,3 +125,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const { idToken, rawIdToken, rawAccessToken, expiresIn, tokenType } = tokens; | ||
const { idToken, rawIdToken, rawAccessToken, refreshToken, expiresIn, tokenType } = tokens; | ||
return new Promise((resolve, reject) => { | ||
@@ -142,2 +142,3 @@ //wait for identity to be set before closing the popup | ||
rawAccessToken: rawAccessToken, | ||
refreshToken: refreshToken, | ||
expiresIn: expiresIn, | ||
@@ -144,0 +145,0 @@ tokenType: tokenType, |
@@ -87,3 +87,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const tokens = yield this.openPassApiClient.exchangeAuthCodeForTokens(redirectParams.code, authSession); | ||
const { idToken, rawIdToken, accessToken, tokenType, expiresIn } = tokens; | ||
const { idToken, rawIdToken, accessToken, refreshToken, tokenType, expiresIn } = tokens; | ||
return { | ||
@@ -96,2 +96,3 @@ clientState: authSession.clientState, | ||
rawAccessToken: accessToken, | ||
refreshToken: refreshToken, | ||
tokenType: tokenType, | ||
@@ -98,0 +99,0 @@ expiresIn: expiresIn, |
@@ -12,2 +12,3 @@ export type ClientTelemetryEventType = "SignInWithOpenPassButtonShown" | "SignInWithOpenPassInlineFormShown" | "SignInWithOpenPassQuickSignShown" | "SignInWithOpenPassQuickSignDismissed"; | ||
access_token: string; | ||
refresh_token: string; | ||
state: string; | ||
@@ -14,0 +15,0 @@ token_type: string; |
@@ -77,3 +77,3 @@ import { SdkError } from "./auth/error/errors"; | ||
/** | ||
* The access token string, which can be used to do Bearer authorization against APIs. | ||
* The access token, which can be used to do Bearer authorization against APIs. | ||
*/ | ||
@@ -87,2 +87,6 @@ accessToken: string; | ||
/** | ||
* The refresh token, which can be used to refresh an expired access token. | ||
*/ | ||
refreshToken: string; | ||
/** | ||
* The token type, which is always "Bearer". | ||
@@ -89,0 +93,0 @@ */ |
@@ -6,3 +6,3 @@ { | ||
"license": "MIT", | ||
"version": "4.4.1", | ||
"version": "4.4.2", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1297328
7606