@flashbacktech/flashbackclient 0.2.23 → 0.2.24
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/api/client.d.ts +1 -1
- package/dist/api/client.js +4 -4
- package/package.json +1 -1
package/dist/api/client.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare class ApiClient implements IApiClient {
|
|
|
37
37
|
setDebug: (debug: boolean) => void;
|
|
38
38
|
setAuthToken: (token: string | null) => void;
|
|
39
39
|
authenticate: (token: string, provider: ProviderType, deviceInfo?: DeviceInfo) => Promise<any>;
|
|
40
|
-
exchangeCode: (code: string, provider: ProviderType) => Promise<OAuth2ResponseDTO>;
|
|
40
|
+
exchangeCode: (code: string, provider: ProviderType, uid?: string, token?: string) => Promise<OAuth2ResponseDTO>;
|
|
41
41
|
private exchangeGithubCode;
|
|
42
42
|
private exchangeWeb3StellarCode;
|
|
43
43
|
/**
|
package/dist/api/client.js
CHANGED
|
@@ -40,10 +40,10 @@ class ApiClient {
|
|
|
40
40
|
throw new Error(`Unsupported provider: ${provider}`);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
|
-
this.exchangeCode = async (code, provider) => {
|
|
43
|
+
this.exchangeCode = async (code, provider, uid, token) => {
|
|
44
44
|
switch (provider) {
|
|
45
45
|
case interfaces_1.ProviderType.GOOGLE:
|
|
46
|
-
return this.exchangeGoogleCode(code);
|
|
46
|
+
return this.exchangeGoogleCode(code, uid, token);
|
|
47
47
|
case interfaces_1.ProviderType.GITHUB:
|
|
48
48
|
return this.exchangeGithubCode(code);
|
|
49
49
|
case interfaces_1.ProviderType.WEB3_STELLAR:
|
|
@@ -152,8 +152,8 @@ class ApiClient {
|
|
|
152
152
|
refresh_token: refreshToken,
|
|
153
153
|
});
|
|
154
154
|
};
|
|
155
|
-
this.exchangeGoogleCode = async (code) => {
|
|
156
|
-
return this.makeRequest('auth/google/exchange', 'POST', { code });
|
|
155
|
+
this.exchangeGoogleCode = async (code, uid, token) => {
|
|
156
|
+
return this.makeRequest('auth/google/exchange', 'POST', { code, uid, token });
|
|
157
157
|
};
|
|
158
158
|
// Token Management
|
|
159
159
|
this.getTokens = async () => {
|