@openfort/react-native 1.0.0 → 1.0.2
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/core/client.js
CHANGED
|
@@ -24,7 +24,7 @@ import { createNormalizedStorage, SecureStorageAdapter } from './storage';
|
|
|
24
24
|
* const accessToken = await client.getAccessToken();
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
export function createOpenfortClient({ baseConfiguration, overrides, shieldConfiguration, }) {
|
|
27
|
+
export function createOpenfortClient({ baseConfiguration, overrides, shieldConfiguration, thirdPartyAuth, }) {
|
|
28
28
|
const nativeAppId = getNativeApplicationId();
|
|
29
29
|
logger.info('Creating Openfort client with native app ID', nativeAppId);
|
|
30
30
|
// appId,
|
|
@@ -52,6 +52,7 @@ export function createOpenfortClient({ baseConfiguration, overrides, shieldConfi
|
|
|
52
52
|
storage: createNormalizedStorage(baseConfiguration.publishableKey, SecureStorageAdapter),
|
|
53
53
|
},
|
|
54
54
|
shieldConfiguration,
|
|
55
|
+
thirdPartyAuth,
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
@@ -66,7 +66,7 @@ export function useWalletAuth(hookOptions) {
|
|
|
66
66
|
setSiweState({ status: 'generating-message' });
|
|
67
67
|
// Get wallet address from the external wallet
|
|
68
68
|
const walletAddress = typeof args.wallet === 'string' ? args.wallet : args.wallet.address;
|
|
69
|
-
const result = await client.auth.
|
|
69
|
+
const result = await client.auth.initSiwe({
|
|
70
70
|
address: walletAddress,
|
|
71
71
|
});
|
|
72
72
|
// Build the SIWE message
|
|
@@ -107,7 +107,7 @@ export function useWalletAuth(hookOptions) {
|
|
|
107
107
|
if (!accessToken) {
|
|
108
108
|
throw new Error('User must be authenticated to link wallet');
|
|
109
109
|
}
|
|
110
|
-
const result = await client.auth.
|
|
110
|
+
const result = await client.auth.loginWithSiwe({
|
|
111
111
|
signature: opts.signature,
|
|
112
112
|
message: message,
|
|
113
113
|
walletClientType: 'unknown',
|
|
@@ -146,7 +146,7 @@ export function useWalletAuth(hookOptions) {
|
|
|
146
146
|
if (!message) {
|
|
147
147
|
throw new Error('SIWE message is required. Call generateSiweMessage first.');
|
|
148
148
|
}
|
|
149
|
-
const result = await client.auth.
|
|
149
|
+
const result = await client.auth.loginWithSiwe({
|
|
150
150
|
signature: opts.signature,
|
|
151
151
|
message: message,
|
|
152
152
|
walletClientType: 'unknown',
|
|
@@ -20,7 +20,7 @@ import { Openfort as OpenfortClient, type OpenfortSDKConfiguration } from '@open
|
|
|
20
20
|
* const accessToken = await client.getAccessToken();
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare function createOpenfortClient({ baseConfiguration, overrides, shieldConfiguration, }: OpenfortSDKConfiguration): OpenfortClient;
|
|
23
|
+
export declare function createOpenfortClient({ baseConfiguration, overrides, shieldConfiguration, thirdPartyAuth, }: OpenfortSDKConfiguration): OpenfortClient;
|
|
24
24
|
/**
|
|
25
25
|
* Retrieves the lazily initialised default {@link OpenfortClient} instance.
|
|
26
26
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfort/react-native",
|
|
3
3
|
"main": "dist/index.js",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "React Native SDK for Openfort platform integration",
|
|
7
7
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@openfort/openfort-js": "^1.
|
|
27
|
+
"@openfort/openfort-js": "^1.1.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"expo-apple-authentication": "*",
|