@newgameplusinc/odyssey-sso 0.1.0 → 1.0.0
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 +3 -1
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.js +7 -0
- package/dist/index.d.ts +7 -10
- package/dist/index.js +154 -2571
- package/dist/lib/axios.d.ts +0 -1
- package/dist/lib/axios.js +20 -0
- package/dist/lib/database.d.ts +18 -0
- package/dist/lib/database.js +91 -0
- package/package.json +5 -5
package/README.md
CHANGED
package/dist/config/index.d.ts
CHANGED
|
@@ -2,3 +2,6 @@ export declare const SDK_NAME = "@newgameplusinc/odyssey-sso";
|
|
|
2
2
|
export declare const SDK_VERSION = "0.1.0";
|
|
3
3
|
export declare const SSO_SERVER_URL = "https://api-gateway.tenant-newgameproduction-ctrlpln.ord1.ingress.coreweave.cloud/sso";
|
|
4
4
|
export declare const SSO_CLIENT_URL = "https://odyssey-sso-client.vercel.app";
|
|
5
|
+
export declare const DB_NAME = "odyssey";
|
|
6
|
+
export declare const DB_VERSION = 1;
|
|
7
|
+
export declare const STORE_NAME = "users";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const SDK_NAME = "@newgameplusinc/odyssey-sso";
|
|
2
|
+
export const SDK_VERSION = "0.1.0";
|
|
3
|
+
export const SSO_SERVER_URL = "https://api-gateway.tenant-newgameproduction-ctrlpln.ord1.ingress.coreweave.cloud/sso";
|
|
4
|
+
export const SSO_CLIENT_URL = "https://odyssey-sso-client.vercel.app";
|
|
5
|
+
export const DB_NAME = "odyssey";
|
|
6
|
+
export const DB_VERSION = 1;
|
|
7
|
+
export const STORE_NAME = "users";
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export default class OdysseySSO extends Axios {
|
|
|
4
4
|
private debug;
|
|
5
5
|
private clientId;
|
|
6
6
|
private apiKey;
|
|
7
|
+
private db;
|
|
7
8
|
constructor({ apiKey, clientId, debug, }: {
|
|
8
9
|
apiKey: string;
|
|
9
10
|
clientId: string;
|
|
@@ -15,16 +16,12 @@ export default class OdysseySSO extends Axios {
|
|
|
15
16
|
* @param code - the token you got from the callback
|
|
16
17
|
* @param clientSecret - keep it empty for client side exchange, for better security use clientSecret from your server
|
|
17
18
|
*/
|
|
18
|
-
readonly exchangeCode: (
|
|
19
|
-
readonly isSuccess: true;
|
|
20
|
-
readonly data: {
|
|
21
|
-
readonly accessToken: string;
|
|
22
|
-
readonly refreshToken: string;
|
|
23
|
-
};
|
|
24
|
-
} | {
|
|
19
|
+
readonly exchangeCode: (redirectPath?: string) => Promise<{
|
|
25
20
|
readonly isSuccess: false;
|
|
26
21
|
readonly data: null;
|
|
27
|
-
}>;
|
|
28
|
-
readonly
|
|
29
|
-
readonly
|
|
22
|
+
} | undefined>;
|
|
23
|
+
readonly getProfileData: () => Promise<Record<string, any> | null>;
|
|
24
|
+
readonly logout: () => Promise<void>;
|
|
25
|
+
readonly refreshToken: () => Promise<void>;
|
|
26
|
+
readonly updateAvatar: (avatar: string) => Promise<import("axios").AxiosResponse<any, any, {}>>;
|
|
30
27
|
}
|