@privy-io/react-auth 1.24.0-beta.1 → 1.24.0-beta.3
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/esm/index.js +35 -35
- package/dist/index.d.ts +10 -0
- package/dist/index.js +36 -36
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -301,6 +301,7 @@ type PrivyServerConfig = {
|
|
|
301
301
|
updatedAt?: Date;
|
|
302
302
|
logoUrl?: string;
|
|
303
303
|
accentColor?: string;
|
|
304
|
+
customApiUrl?: string | null;
|
|
304
305
|
};
|
|
305
306
|
type HexColor = `#${string}`;
|
|
306
307
|
type PrivyClientConfig = {
|
|
@@ -956,6 +957,7 @@ declare class Http {
|
|
|
956
957
|
private client;
|
|
957
958
|
private defaults;
|
|
958
959
|
private sdkVersion;
|
|
960
|
+
fallbackApiUrl: string;
|
|
959
961
|
constructor(appId: string, client: PrivyClient, defaults: DefaultsType);
|
|
960
962
|
get<T = any, R = AxiosResponse<T>, D = any>(path: string, config?: AxiosRequestConfig<D>, fetchAccessToken?: boolean): Promise<R>;
|
|
961
963
|
post<T = any, R = AxiosResponse<T>, D = any>(path: string, data?: D, config?: AxiosRequestConfig<D>, fetchAccessToken?: boolean): Promise<R>;
|
|
@@ -1015,8 +1017,10 @@ declare class PrivyClient {
|
|
|
1015
1017
|
private api;
|
|
1016
1018
|
private appId;
|
|
1017
1019
|
private session;
|
|
1020
|
+
private timeout;
|
|
1018
1021
|
private clientAnalyticsId;
|
|
1019
1022
|
apiUrl: string;
|
|
1023
|
+
fallbackApiUrl: string;
|
|
1020
1024
|
authFlow?: AuthFlow;
|
|
1021
1025
|
connectors: ConnectorManager;
|
|
1022
1026
|
/**
|
|
@@ -1037,6 +1041,12 @@ declare class PrivyClient {
|
|
|
1037
1041
|
*/
|
|
1038
1042
|
timeout?: number;
|
|
1039
1043
|
});
|
|
1044
|
+
generateApi(): Http;
|
|
1045
|
+
/**
|
|
1046
|
+
* In the case of cookie-based auth, re-initialize the http client with the custom api url.
|
|
1047
|
+
* @param customApiUrl the custom api url to use for cookie-based authFlow
|
|
1048
|
+
*/
|
|
1049
|
+
updateApiUrl(customApiUrl?: string | null): void;
|
|
1040
1050
|
authenticate(): Promise<{
|
|
1041
1051
|
user: User | null;
|
|
1042
1052
|
isNewUser?: boolean | undefined;
|