@authgear/web
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -30,3 +30,6 @@ /** | ||
*/ | ||
export declare type ColorScheme = "light" | "dark"; | ||
export declare enum ColorScheme { | ||
Light = "light", | ||
Dark = "dark" | ||
} | ||
@@ -41,26 +44,19 @@ /** | ||
/** | ||
* ErrorName is the union of the keys of {@link ErrorNames}. | ||
* ErrorName contains all possible name in {@link ServerError} | ||
* | ||
* @public | ||
*/ | ||
export declare type ErrorName = typeof ErrorNames[keyof typeof ErrorNames]; | ||
export declare enum ErrorName { | ||
BadRequest = "BadRequest", | ||
Invalid = "Invalid", | ||
Unauthorized = "Unauthorized", | ||
Forbidden = "Forbidden", | ||
NotFound = "NotFound", | ||
AlreadyExists = "AlreadyExists", | ||
TooManyRequest = "TooManyRequest", | ||
InternalError = "InternalError", | ||
ServiceUnavailable = "ServiceUnavailable" | ||
} | ||
/** | ||
* ErrorNames contains all possible name in {@link ServerError} | ||
* | ||
* @public | ||
*/ | ||
export declare const ErrorNames: { | ||
readonly BadRequest: "BadRequest"; | ||
readonly Invalid: "Invalid"; | ||
readonly Unauthorized: "Unauthorized"; | ||
readonly Forbidden: "Forbidden"; | ||
readonly NotFound: "NotFound"; | ||
readonly AlreadyExists: "AlreadyExists"; | ||
readonly TooManyRequest: "TooManyRequest"; | ||
readonly InternalError: "InternalError"; | ||
readonly ServiceUnavailable: "ServiceUnavailable"; | ||
}; | ||
/** | ||
* OAuthError represents the oauth error response. | ||
@@ -97,3 +93,8 @@ * https://tools.ietf.org/html/rfc6749#section-4.1.2.1 | ||
*/ | ||
export declare type PromptOption = "none" | "login" | "consent" | "select_account"; | ||
export declare enum PromptOption { | ||
None = "none", | ||
Login = "login", | ||
Consent = "consent", | ||
SelectAccount = "select_account" | ||
} | ||
@@ -110,3 +111,3 @@ /** | ||
* @remarks | ||
* See {@link ErrorNames} for possible values. | ||
* See {@link ErrorName} for possible values. | ||
* New error names may be added in future. | ||
@@ -145,3 +146,7 @@ */ | ||
*/ | ||
export declare type SessionState = "UNKNOWN" | "NO_SESSION" | "AUTHENTICATED"; | ||
export declare enum SessionState { | ||
Unknown = "UNKNOWN", | ||
NoSession = "NO_SESSION", | ||
Authenticated = "AUTHENTICATED" | ||
} | ||
@@ -164,3 +169,10 @@ /** | ||
*/ | ||
export declare type SessionStateChangeReason = "NO_TOKEN" | "FOUND_TOKEN" | "AUTHENTICATED" | "LOGOUT" | "INVALID" | "CLEAR"; | ||
export declare enum SessionStateChangeReason { | ||
NoToken = "NO_TOKEN", | ||
FoundToken = "FOUND_TOKEN", | ||
Authenticated = "AUTHENTICATED", | ||
Logout = "LOGOUT", | ||
Invalid = "INVALID", | ||
Clear = "CLEAR" | ||
} | ||
@@ -323,2 +335,13 @@ /** | ||
sessionType?: "cookie" | "refresh_token"; | ||
/** | ||
* Single-sign-on (SSO) is defined as login once, logged in all apps. | ||
* When isSSOEnabled is true, users only need to enter their authentication credentials once. | ||
* When the user login the second app, they will see the continue screen so that they can log in with just a click. | ||
* Logout from one app will also logout from all the apps. | ||
* | ||
* This flag is used when sessionType is "refresh_token" only. | ||
* When sessionType is "cookie", sessions are shared among subdomains and this flag is not needed. | ||
* @defaultValue false | ||
*/ | ||
isSSOEnabled?: boolean; | ||
} | ||
@@ -445,5 +468,12 @@ | ||
/** | ||
* Is SSO enabled | ||
* | ||
* @public | ||
*/ | ||
get isSSOEnabled(): boolean; | ||
set isSSOEnabled(isSSOEnabled: boolean); | ||
/** | ||
* | ||
* @public | ||
*/ | ||
get sessionState(): SessionState; | ||
@@ -450,0 +480,0 @@ set sessionState(sessionState: SessionState); |
{ | ||
"name": "@authgear/web", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"license": "Apache-2.0", | ||
@@ -14,5 +14,5 @@ "main": "dist/authgear-web.cjs.js", | ||
"devDependencies": { | ||
"@authgear/core": "1.0.1", | ||
"@authgear/core": "2.0.0", | ||
"core-js-pure": "3.22.7" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
832826
22247