@atlaskit/outbound-auth-flow-client
Advanced tools
Comparing version 3.0.0 to 3.1.0
# @atlaskit/outbound-auth-flow-client | ||
## 3.1.0 | ||
### Minor Changes | ||
- [`4c8eb0ba4a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/4c8eb0ba4a) - Add custom AuthError and AuthErrorType | ||
## 3.0.0 | ||
@@ -4,0 +10,0 @@ |
export declare function auth(startUrl: string): Promise<void>; | ||
export { AuthError } from './error'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var error_1 = require("./error"); | ||
var types_1 = require("./types"); | ||
function auth(startUrl) { | ||
@@ -22,3 +24,9 @@ return new Promise(function (resolve, reject) { | ||
finish(); | ||
reject(new Error(data.message)); | ||
var errorType = data.errorType.toLowerCase(); | ||
if (types_1.isOfTypeAuthError(errorType)) { | ||
reject(new error_1.AuthError(data.message, errorType)); | ||
} | ||
else { | ||
reject(new error_1.AuthError(data.message)); | ||
} | ||
break; | ||
@@ -30,3 +38,3 @@ } | ||
finish(); | ||
reject(new Error('The auth window was closed')); | ||
reject(new error_1.AuthError('The auth window was closed', 'auth_window_closed')); | ||
} | ||
@@ -51,2 +59,4 @@ }; | ||
exports.auth = auth; | ||
var error_2 = require("./error"); | ||
exports.AuthError = error_2.AuthError; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@atlaskit/outbound-auth-flow-client", | ||
"version": "3.0.0" | ||
"version": "3.1.0" | ||
} |
export declare function auth(startUrl: string): Promise<void>; | ||
export { AuthError } from './error'; |
@@ -0,1 +1,3 @@ | ||
import { AuthError } from './error'; | ||
import { isOfTypeAuthError } from './types'; | ||
export function auth(startUrl) { | ||
@@ -20,3 +22,9 @@ return new Promise((resolve, reject) => { | ||
finish(); | ||
reject(new Error(data.message)); | ||
const errorType = data.errorType.toLowerCase(); | ||
if (isOfTypeAuthError(errorType)) { | ||
reject(new AuthError(data.message, errorType)); | ||
} | ||
else { | ||
reject(new AuthError(data.message)); | ||
} | ||
break; | ||
@@ -28,3 +36,3 @@ } | ||
finish(); | ||
reject(new Error('The auth window was closed')); | ||
reject(new AuthError('The auth window was closed', 'auth_window_closed')); | ||
} | ||
@@ -48,2 +56,3 @@ }; | ||
} | ||
export { AuthError } from './error'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@atlaskit/outbound-auth-flow-client", | ||
"version": "3.0.0" | ||
"version": "3.1.0" | ||
} |
export declare function auth(startUrl: string): Promise<void>; | ||
export { AuthError } from './error'; |
@@ -0,1 +1,3 @@ | ||
import { AuthError } from './error'; | ||
import { isOfTypeAuthError } from './types'; | ||
export function auth(startUrl) { | ||
@@ -20,3 +22,9 @@ return new Promise(function (resolve, reject) { | ||
finish(); | ||
reject(new Error(data.message)); | ||
var errorType = data.errorType.toLowerCase(); | ||
if (isOfTypeAuthError(errorType)) { | ||
reject(new AuthError(data.message, errorType)); | ||
} | ||
else { | ||
reject(new AuthError(data.message)); | ||
} | ||
break; | ||
@@ -28,3 +36,3 @@ } | ||
finish(); | ||
reject(new Error('The auth window was closed')); | ||
reject(new AuthError('The auth window was closed', 'auth_window_closed')); | ||
} | ||
@@ -48,2 +56,3 @@ }; | ||
} | ||
export { AuthError } from './error'; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@atlaskit/outbound-auth-flow-client", | ||
"version": "3.0.0" | ||
"version": "3.1.0" | ||
} |
{ | ||
"name": "@atlaskit/outbound-auth-flow-client", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Front-end library for starting outbound auth flows", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25267
38
331