@faable/auth-sdk 1.3.4 → 1.3.5
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/dist/FaableAuthApi.d.ts +1 -1
- package/dist/FaableAuthApi.js +6 -1
- package/dist/helpers.d.ts +1 -0
- package/dist/helpers.js +7 -0
- package/dist/types/api.d.ts +3 -2
- package/package.json +1 -1
package/dist/FaableAuthApi.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { ApiParams, FaableApi } from "@faable/sdk-base";
|
|
|
3
3
|
type FaableAuthApiParams = {
|
|
4
4
|
team_id?: string;
|
|
5
5
|
account_id?: string;
|
|
6
|
-
|
|
6
|
+
domain?: string;
|
|
7
7
|
} & ApiParams;
|
|
8
8
|
export declare class FaableAuthApi extends FaableApi {
|
|
9
9
|
constructor(params?: FaableAuthApiParams);
|
package/dist/FaableAuthApi.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { getDomain } from "./helpers.js";
|
|
1
2
|
import { FaableApi } from "@faable/sdk-base";
|
|
2
3
|
export class FaableAuthApi extends FaableApi {
|
|
3
4
|
constructor(params) {
|
|
5
|
+
let baseURL = "https://faable.auth.faable.link";
|
|
6
|
+
if (params?.domain) {
|
|
7
|
+
baseURL = getDomain(params.domain);
|
|
8
|
+
}
|
|
4
9
|
super({
|
|
5
|
-
baseURL
|
|
10
|
+
baseURL,
|
|
6
11
|
...params,
|
|
7
12
|
fetcher: {
|
|
8
13
|
...params?.fetcher,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getDomain: (domain: string) => string;
|
package/dist/helpers.js
ADDED
package/dist/types/api.d.ts
CHANGED
|
@@ -2032,6 +2032,9 @@ export interface components {
|
|
|
2032
2032
|
UsernamepasswordLoginBody: {
|
|
2033
2033
|
username: string;
|
|
2034
2034
|
password: string;
|
|
2035
|
+
/** @description An opaque value the applications adds to the initial request that the authorization server includes when redirecting the back to the application. This value must be used by the application to prevent CSRF attacks. */
|
|
2036
|
+
state?: string;
|
|
2037
|
+
response_type?: string;
|
|
2035
2038
|
client_id: string;
|
|
2036
2039
|
/** @description Deprecated. Use connection_id */
|
|
2037
2040
|
connection?: string;
|
|
@@ -2040,8 +2043,6 @@ export interface components {
|
|
|
2040
2043
|
scope?: string;
|
|
2041
2044
|
/** @description The URL to which Faable will redirect the browser after authorization has been granted by the user. */
|
|
2042
2045
|
redirect_uri?: string;
|
|
2043
|
-
/** @description An opaque value the applications adds to the initial request that the authorization server includes when redirecting the back to the application. This value must be used by the application to prevent CSRF attacks. */
|
|
2044
|
-
state?: string;
|
|
2045
2046
|
prompt?: string;
|
|
2046
2047
|
};
|
|
2047
2048
|
LoginCallbackBody: {
|