@edge-markets/connect-react-native 1.5.0 → 1.5.1
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 +6 -6
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -0
- package/dist/index.mjs +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -74,7 +74,7 @@ import { Button, Alert } from 'react-native'
|
|
|
74
74
|
function ConnectEdgeButton() {
|
|
75
75
|
const { open, isOpen, isSuccess, result, error, reset } = useEdgeLink({
|
|
76
76
|
clientId: 'your-client-id',
|
|
77
|
-
environment: '
|
|
77
|
+
environment: 'sandbox',
|
|
78
78
|
redirectUri: 'myapp://oauth/callback',
|
|
79
79
|
})
|
|
80
80
|
|
|
@@ -130,14 +130,14 @@ React hook for EdgeLink integration.
|
|
|
130
130
|
| Property | Type | Required | Description |
|
|
131
131
|
|----------|------|----------|-------------|
|
|
132
132
|
| `clientId` | `string` | ✅ | Your OAuth client ID |
|
|
133
|
-
| `environment` | `'production' \| '
|
|
133
|
+
| `environment` | `'production' \| 'sandbox'` | ✅ | Environment |
|
|
134
134
|
| `redirectUri` | `string` | ✅ | Deep link URI for callback |
|
|
135
135
|
| `scopes` | `EdgeScope[]` | ❌ | Requested permissions |
|
|
136
136
|
| `linkUrl` | `string` | ❌ | Custom Link URL/origin (dev only) |
|
|
137
137
|
| `useExternalBrowser` | `boolean` | ❌ | Use external browser |
|
|
138
138
|
|
|
139
|
-
The SDK derives the hosted Link URL from `environment`;
|
|
140
|
-
`https://oauth.staging-app.edgeboost.io/oauth/link`. `linkUrl` is only needed for
|
|
139
|
+
The SDK derives the hosted Link URL from `environment`; sandbox defaults to
|
|
140
|
+
`https://sandbox-oauth.staging-app.edgeboost.io/oauth/link`. `linkUrl` is only needed for
|
|
141
141
|
nonstandard deployments. If provided as an origin, for example
|
|
142
142
|
`https://oauth.example.com`, the SDK appends `/oauth/link`.
|
|
143
143
|
|
|
@@ -162,7 +162,7 @@ import { EdgeLink } from '@edge-markets/connect-react-native'
|
|
|
162
162
|
|
|
163
163
|
const link = new EdgeLink({
|
|
164
164
|
clientId: 'your-client-id',
|
|
165
|
-
environment: '
|
|
165
|
+
environment: 'sandbox',
|
|
166
166
|
redirectUri: 'myapp://oauth/callback',
|
|
167
167
|
onSuccess: (result) => {
|
|
168
168
|
console.log('Auth code:', result.code)
|
|
@@ -262,7 +262,7 @@ import { EdgeConnectServer } from '@edge-markets/connect-node'
|
|
|
262
262
|
const server = new EdgeConnectServer({
|
|
263
263
|
clientId: 'your-client-id',
|
|
264
264
|
clientSecret: 'your-client-secret',
|
|
265
|
-
environment: '
|
|
265
|
+
environment: 'sandbox',
|
|
266
266
|
})
|
|
267
267
|
|
|
268
268
|
// In your API endpoint
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EdgeLinkConfigBase, EdgeEnvironment, EdgeScope, EdgeLinkSuccess, EdgeLinkEvent, SdkGeolocation, PKCEPair } from '@edge-markets/connect';
|
|
2
|
-
export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, Balance, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_ENVIRONMENTS, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeLinkEvent, EdgeLinkEventName, EdgeLinkExit, EdgeLinkSuccess, EdgeNetworkError, EdgePopupBlockedError, EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, EdgeTokens, PKCEPair, SCOPE_DESCRIPTIONS, SdkGeolocation, Transfer, User, formatScopesForEnvironment, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isFeatureUnavailableError, isNetworkError } from '@edge-markets/connect';
|
|
2
|
+
export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, Balance, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_ENVIRONMENTS, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeLinkEvent, EdgeLinkEventName, EdgeLinkExit, EdgeLinkSuccess, EdgeNetworkError, EdgePopupBlockedError, EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, EdgeTokens, PKCEPair, RESERVED_EDGE_SCOPES, SCOPE_DESCRIPTIONS, SdkGeolocation, Transfer, User, formatScopesForEnvironment, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isFeatureUnavailableError, isNetworkError } from '@edge-markets/connect';
|
|
3
3
|
|
|
4
4
|
interface EdgeLinkConfig extends EdgeLinkConfigBase {
|
|
5
5
|
redirectUri: string;
|
|
@@ -87,7 +87,7 @@ interface UseEdgeLinkReturn {
|
|
|
87
87
|
* function ConnectButton() {
|
|
88
88
|
* const { open, isOpen, isSuccess, result, error } = useEdgeLink({
|
|
89
89
|
* clientId: 'your-client-id',
|
|
90
|
-
* environment: '
|
|
90
|
+
* environment: 'sandbox',
|
|
91
91
|
* redirectUri: 'myapp://oauth/callback',
|
|
92
92
|
* })
|
|
93
93
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EdgeLinkConfigBase, EdgeEnvironment, EdgeScope, EdgeLinkSuccess, EdgeLinkEvent, SdkGeolocation, PKCEPair } from '@edge-markets/connect';
|
|
2
|
-
export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, Balance, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_ENVIRONMENTS, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeLinkEvent, EdgeLinkEventName, EdgeLinkExit, EdgeLinkSuccess, EdgeNetworkError, EdgePopupBlockedError, EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, EdgeTokens, PKCEPair, SCOPE_DESCRIPTIONS, SdkGeolocation, Transfer, User, formatScopesForEnvironment, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isFeatureUnavailableError, isNetworkError } from '@edge-markets/connect';
|
|
2
|
+
export { ACTIVE_EDGE_SCOPES, ALL_EDGE_SCOPES, Balance, EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE, EDGE_ENVIRONMENTS, EdgeApiError, EdgeAuthenticationError, EdgeConsentRequiredError, EdgeEnvironment, EdgeError, EdgeFeatureUnavailableError, EdgeLinkEvent, EdgeLinkEventName, EdgeLinkExit, EdgeLinkSuccess, EdgeNetworkError, EdgePopupBlockedError, EdgeScope, EdgeStateMismatchError, EdgeTokenExchangeError, EdgeTokens, PKCEPair, RESERVED_EDGE_SCOPES, SCOPE_DESCRIPTIONS, SdkGeolocation, Transfer, User, formatScopesForEnvironment, getEnvironmentConfig, isApiError, isAuthenticationError, isConsentRequiredError, isFeatureUnavailableError, isNetworkError } from '@edge-markets/connect';
|
|
3
3
|
|
|
4
4
|
interface EdgeLinkConfig extends EdgeLinkConfigBase {
|
|
5
5
|
redirectUri: string;
|
|
@@ -87,7 +87,7 @@ interface UseEdgeLinkReturn {
|
|
|
87
87
|
* function ConnectButton() {
|
|
88
88
|
* const { open, isOpen, isSuccess, result, error } = useEdgeLink({
|
|
89
89
|
* clientId: 'your-client-id',
|
|
90
|
-
* environment: '
|
|
90
|
+
* environment: 'sandbox',
|
|
91
91
|
* redirectUri: 'myapp://oauth/callback',
|
|
92
92
|
* })
|
|
93
93
|
*
|
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
EdgePopupBlockedError: () => import_connect2.EdgePopupBlockedError,
|
|
45
45
|
EdgeStateMismatchError: () => import_connect2.EdgeStateMismatchError,
|
|
46
46
|
EdgeTokenExchangeError: () => import_connect2.EdgeTokenExchangeError,
|
|
47
|
+
RESERVED_EDGE_SCOPES: () => import_connect2.RESERVED_EDGE_SCOPES,
|
|
47
48
|
SCOPE_DESCRIPTIONS: () => import_connect2.SCOPE_DESCRIPTIONS,
|
|
48
49
|
collectGeolocation: () => collectGeolocation,
|
|
49
50
|
formatScopesForEnvironment: () => import_connect2.formatScopesForEnvironment,
|
|
@@ -724,6 +725,7 @@ async function collectGeolocation() {
|
|
|
724
725
|
EdgePopupBlockedError,
|
|
725
726
|
EdgeStateMismatchError,
|
|
726
727
|
EdgeTokenExchangeError,
|
|
728
|
+
RESERVED_EDGE_SCOPES,
|
|
727
729
|
SCOPE_DESCRIPTIONS,
|
|
728
730
|
collectGeolocation,
|
|
729
731
|
formatScopesForEnvironment,
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ACTIVE_EDGE_SCOPES as ACTIVE_EDGE_SCOPES2,
|
|
4
4
|
ALL_EDGE_SCOPES,
|
|
5
|
+
RESERVED_EDGE_SCOPES,
|
|
5
6
|
EDGE_CONNECT_FEATURE_UNAVAILABLE_MESSAGE,
|
|
6
7
|
EDGE_ENVIRONMENTS,
|
|
7
8
|
EdgeApiError,
|
|
@@ -689,6 +690,7 @@ export {
|
|
|
689
690
|
EdgePopupBlockedError,
|
|
690
691
|
EdgeStateMismatchError,
|
|
691
692
|
EdgeTokenExchangeError,
|
|
693
|
+
RESERVED_EDGE_SCOPES,
|
|
692
694
|
SCOPE_DESCRIPTIONS,
|
|
693
695
|
collectGeolocation,
|
|
694
696
|
formatScopesForEnvironment2 as formatScopesForEnvironment,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edge-markets/connect-react-native",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "React Native SDK for EDGE Connect authentication flow for mobile apps",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"author": "EdgeBoost",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@edge-markets/connect": "^1.
|
|
33
|
+
"@edge-markets/connect": "^1.9.1"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"react": ">=18.0.0",
|