@ankhorage/studio 1.6.0 → 1.7.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAEnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAG5E,UAAU,4BAA6B,SAAQ,mBAAmB;IAChE,QAAQ,CAAC,aAAa,EAAE,0BAA0B,CAAC;CACpD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"oauth.d.ts","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/oauth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAEnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAG5E,UAAU,4BAA6B,SAAQ,mBAAmB;IAChE,QAAQ,CAAC,aAAa,EAAE,0BAA0B,CAAC;CACpD;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,4BAA4B,UAwYvE"}
|
|
@@ -12,6 +12,10 @@ export function getAuthOAuthRuntimeTs(args) {
|
|
|
12
12
|
AuthOAuthCompletionResult,
|
|
13
13
|
AuthOAuthTransportCancellationReason,
|
|
14
14
|
} from '@ankhorage/contracts/auth';
|
|
15
|
+
import {
|
|
16
|
+
resolveExpoOAuthBrowserException,
|
|
17
|
+
resolveExpoOAuthBrowserResult,
|
|
18
|
+
} from '@ankhorage/expo-runtime/oauth-browser';
|
|
15
19
|
import * as Linking from 'expo-linking';
|
|
16
20
|
import * as WebBrowser from 'expo-web-browser';
|
|
17
21
|
import { Platform } from 'react-native';
|
|
@@ -126,32 +130,35 @@ async function runOAuthAuthorization(
|
|
|
126
130
|
});
|
|
127
131
|
}
|
|
128
132
|
|
|
129
|
-
let
|
|
133
|
+
let browserResponse;
|
|
130
134
|
try {
|
|
131
|
-
browserResult = await WebBrowser.openAuthSessionAsync(
|
|
135
|
+
const browserResult = await WebBrowser.openAuthSessionAsync(
|
|
132
136
|
started.data.authorizationUrl,
|
|
133
137
|
started.data.redirectUri,
|
|
134
138
|
);
|
|
139
|
+
browserResponse = resolveExpoOAuthBrowserResult(browserResult);
|
|
140
|
+
} catch {
|
|
141
|
+
browserResponse = resolveExpoOAuthBrowserException();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (browserResponse.type === 'callback') {
|
|
145
|
+
return completeOAuthCallback(browserResponse.url);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
let completed: AuthOAuthCompletionResult;
|
|
149
|
+
try {
|
|
150
|
+
completed = await oauth.completeAuthorization({
|
|
151
|
+
attemptId: started.data.attemptId,
|
|
152
|
+
response: browserResponse,
|
|
153
|
+
});
|
|
135
154
|
} catch {
|
|
136
|
-
await cancelOAuthAttempt(started.data.attemptId, 'browser_dismissed');
|
|
137
155
|
await clearTransportAttempt();
|
|
138
156
|
return {
|
|
139
157
|
status: 'error',
|
|
140
|
-
message: 'The
|
|
158
|
+
message: 'The OAuth browser result could not be completed.',
|
|
141
159
|
recoverable: true,
|
|
142
160
|
};
|
|
143
161
|
}
|
|
144
|
-
|
|
145
|
-
if (browserResult.type === 'success' && typeof browserResult.url === 'string') {
|
|
146
|
-
return completeOAuthCallback(browserResult.url);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
const cancellationReason =
|
|
150
|
-
browserResult.type === 'dismiss' ? 'browser_dismissed' : 'user_cancelled';
|
|
151
|
-
const completed = await oauth.completeAuthorization({
|
|
152
|
-
attemptId: started.data.attemptId,
|
|
153
|
-
response: { type: 'cancelled', reason: cancellationReason },
|
|
154
|
-
});
|
|
155
162
|
await clearTransportAttempt();
|
|
156
163
|
return toTransportOutcome(completed);
|
|
157
164
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/oauth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAMtE,MAAM,UAAU,qBAAqB,CAAC,IAAkC;IACtE,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,aAAa,GACjB,IAAI,CAAC,aAAa,CAAC,OAAO,KAAK,SAAS;QACtC,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC;IAC7D,MAAM,SAAS,GACb,IAAI,CAAC,aAAa,CAAC,GAAG,KAAK,SAAS;QAClC,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;IAEzD,OAAO
|
|
1
|
+
{"version":3,"file":"oauth.js","sourceRoot":"","sources":["../../../../../src/host/layout/templates/auth/oauth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAMtE,MAAM,UAAU,qBAAqB,CAAC,IAAkC;IACtE,MAAM,aAAa,GAAG,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,aAAa,GACjB,IAAI,CAAC,aAAa,CAAC,OAAO,KAAK,SAAS;QACtC,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC;IAC7D,MAAM,SAAS,GACb,IAAI,CAAC,aAAa,CAAC,GAAG,KAAK,SAAS;QAClC,CAAC,CAAC,WAAW;QACb,CAAC,CAAC,IAAI,mBAAmB,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC;IAEzD,OAAO;;;;;;;;;;;;;;;;;;gCAkBuB,aAAa;;;oCAGT,SAAS;;aAEhC,aAAa;SACjB,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmWjB,CAAC;AACF,CAAC"}
|
|
@@ -8,7 +8,7 @@ const UTILITY_VERSION = '^0.2.0';
|
|
|
8
8
|
const SUPABASE_AUTH_VERSION = '^1.1.2';
|
|
9
9
|
const SUPABASE_DB_VERSION = '^1.0.0';
|
|
10
10
|
const ZORA_VERSION = '^2.9.0';
|
|
11
|
-
const EXPO_RUNTIME_VERSION = '^2.
|
|
11
|
+
const EXPO_RUNTIME_VERSION = '^2.4.0';
|
|
12
12
|
const EXPO_DOCUMENT_PICKER_VERSION = '~14.0.8';
|
|
13
13
|
const EXPO_FILE_SYSTEM_VERSION = '~19.0.23';
|
|
14
14
|
const EXPO_IMAGE_PICKER_VERSION = '~17.0.11';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ankhorage/studio",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Studio authoring package for Ankhorage apps",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ankhorage/studio#readme",
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
"@ankhorage/color-theory": "^0.0.8",
|
|
206
206
|
"@ankhorage/contracts": "^7.8.0",
|
|
207
207
|
"@ankhorage/data-sources": "^1.0.1",
|
|
208
|
-
"@ankhorage/expo-runtime": "^2.
|
|
208
|
+
"@ankhorage/expo-runtime": "^2.4.0",
|
|
209
209
|
"@ankhorage/infra": "^3.3.0",
|
|
210
210
|
"@ankhorage/orchestrator": "^0.3.0",
|
|
211
211
|
"@ankhorage/orchestrator-module-expo-google-fonts": "^0.2.0",
|