expo-dev-launcher 58.0.21 → 58.1.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.
- package/CHANGELOG.md +6 -0
- package/android/build.gradle +2 -2
- package/android/src/debug/java/expo/modules/devlauncher/DevLauncherController.kt +2 -0
- package/android/src/debug/java/expo/modules/devlauncher/services/DeviceLogin.kt +103 -0
- package/android/src/debug/java/expo/modules/devlauncher/services/SessionService.kt +9 -0
- package/ios/EXDevLauncherController.m +1 -0
- package/ios/EXDevLauncherDeviceLogin.swift +98 -0
- package/ios/SwiftUI/DevLauncherViewModel.swift +16 -5
- package/ios/SwiftUI/GraphQL/APIClient.swift +8 -0
- package/ios/Tests/EXDevLauncherDeviceLoginTests.swift +30 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 58.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Sign in to the launcher on a simulator or an emulator from the `__expo_device_code`, `__expo_device_match`, and `__expo_device_client` launch URL params. ([#53977](https://github.com/expo/expo/pull/53977) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
8
|
+
|
|
3
9
|
## 58.0.21
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/android/build.gradle
CHANGED
|
@@ -24,13 +24,13 @@ expoModule {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
group = "host.exp.exponent"
|
|
27
|
-
version = "58.0
|
|
27
|
+
version = "58.1.0"
|
|
28
28
|
|
|
29
29
|
android {
|
|
30
30
|
namespace "expo.modules.devlauncher"
|
|
31
31
|
defaultConfig {
|
|
32
32
|
versionCode 9
|
|
33
|
-
versionName "58.0
|
|
33
|
+
versionName "58.1.0"
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
buildTypes {
|
|
@@ -41,6 +41,7 @@ import expo.modules.devlauncher.logs.DevLauncherRemoteLogManager
|
|
|
41
41
|
import expo.modules.devlauncher.react.activitydelegates.DevLauncherReactActivityNOPDelegate
|
|
42
42
|
import expo.modules.devlauncher.react.activitydelegates.DevLauncherReactActivityRedirectDelegate
|
|
43
43
|
import expo.modules.devlauncher.services.DependencyInjection
|
|
44
|
+
import expo.modules.devlauncher.services.signInFromLaunchUrl
|
|
44
45
|
import expo.modules.devmenu.launch.ExpoLauncherUrl
|
|
45
46
|
import expo.modules.devmenu.launch.applyDevMenuLaunchParams
|
|
46
47
|
import expo.modules.kotlin.weak
|
|
@@ -307,6 +308,7 @@ class DevLauncherController private constructor(
|
|
|
307
308
|
|
|
308
309
|
// The dev menu params apply to every launcher command, with or without a `__expo_url`.
|
|
309
310
|
DependencyInjection.devMenuPreferences?.let { launch.applyDevMenuLaunchParams(it) }
|
|
311
|
+
coroutineScope.launch { signInFromLaunchUrl(uri) }
|
|
310
312
|
|
|
311
313
|
if (launch.targetUrl == null) {
|
|
312
314
|
if (!launch.isLegacyHost && launch.remainderHasDestination) {
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
package expo.modules.devlauncher.services
|
|
2
|
+
|
|
3
|
+
import android.net.Uri
|
|
4
|
+
import android.util.Log
|
|
5
|
+
import expo.modules.core.utilities.EmulatorUtilities
|
|
6
|
+
import expo.modules.devlauncher.compose.Session
|
|
7
|
+
import expo.modules.devlauncher.helpers.await
|
|
8
|
+
import okhttp3.MediaType.Companion.toMediaType
|
|
9
|
+
import okhttp3.Request
|
|
10
|
+
import okhttp3.RequestBody.Companion.toRequestBody
|
|
11
|
+
import org.json.JSONObject
|
|
12
|
+
|
|
13
|
+
private const val TAG = "DevLauncherDeviceLogin"
|
|
14
|
+
|
|
15
|
+
/** Set by a sign out and cleared by a sign in: a launch URL does not undo a sign out. */
|
|
16
|
+
internal const val SIGNED_OUT_KEY = "signed_out"
|
|
17
|
+
|
|
18
|
+
/** The `__expo_device_*` params of a launch URL. */
|
|
19
|
+
data class DeviceLoginRequest(
|
|
20
|
+
val deviceCode: String,
|
|
21
|
+
val matchValue: String,
|
|
22
|
+
val clientId: String
|
|
23
|
+
) {
|
|
24
|
+
companion object {
|
|
25
|
+
fun parse(uri: Uri): DeviceLoginRequest? {
|
|
26
|
+
if (!uri.isHierarchical) {
|
|
27
|
+
return null
|
|
28
|
+
}
|
|
29
|
+
fun query(name: String) = uri.getQueryParameter(name)?.takeIf { it.isNotEmpty() }
|
|
30
|
+
|
|
31
|
+
return DeviceLoginRequest(
|
|
32
|
+
deviceCode = query("__expo_device_code") ?: return null,
|
|
33
|
+
matchValue = query("__expo_device_match") ?: return null,
|
|
34
|
+
clientId = query("__expo_device_client") ?: return null
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The server sends two digits. Another two-digit value is a failed match, not a malformed request. */
|
|
40
|
+
val wrongMatchValue: String
|
|
41
|
+
get() = if (matchValue == "00") {
|
|
42
|
+
"01"
|
|
43
|
+
} else {
|
|
44
|
+
"00"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Signs the launcher in from a launch URL. The tool that opens the URL (Expo CLI, Expo Orbit)
|
|
50
|
+
* creates an OAuth device code and approves it with its own session; the launcher exchanges the
|
|
51
|
+
* code for a session of its own. A failure only writes a log line: the launch continues signed out.
|
|
52
|
+
*/
|
|
53
|
+
suspend fun signInFromLaunchUrl(uri: Uri) {
|
|
54
|
+
val sessionService = DependencyInjection.sessionService ?: return
|
|
55
|
+
val sessionStore = sessionService.sessionStore
|
|
56
|
+
// Emulator only: on a device, a link from another app could sign the launcher in to the
|
|
57
|
+
// sender's account. An emulator has the same risk, because the check does not look at the
|
|
58
|
+
// sender. That is the accepted risk: a launch URL can already open any project. The check reads
|
|
59
|
+
// `Build` properties, so a device with a custom ROM can pass it. This file is only in debug builds.
|
|
60
|
+
if (!EmulatorUtilities.isRunningOnEmulator()) {
|
|
61
|
+
return
|
|
62
|
+
}
|
|
63
|
+
val request = DeviceLoginRequest.parse(uri) ?: return
|
|
64
|
+
val redeems = Session.loadFromPreferences(sessionStore) == null &&
|
|
65
|
+
!sessionStore.getBoolean(SIGNED_OUT_KEY, false)
|
|
66
|
+
|
|
67
|
+
runCatching {
|
|
68
|
+
val payload = JSONObject()
|
|
69
|
+
.put("grant_type", "urn:ietf:params:oauth:grant-type:device_code")
|
|
70
|
+
.put("client_id", request.clientId)
|
|
71
|
+
.put("device_code", request.deviceCode)
|
|
72
|
+
// The running app gets this URL too. When the launcher does not redeem the code, a wrong
|
|
73
|
+
// match value makes the server reject the code from then on.
|
|
74
|
+
.put(
|
|
75
|
+
"match_value",
|
|
76
|
+
if (redeems) {
|
|
77
|
+
request.matchValue
|
|
78
|
+
} else {
|
|
79
|
+
request.wrongMatchValue
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
.toString()
|
|
83
|
+
val response = Request
|
|
84
|
+
.Builder()
|
|
85
|
+
.url("https://api.expo.dev/v2/auth/token")
|
|
86
|
+
.post(payload.toRequestBody("application/json".toMediaType()))
|
|
87
|
+
.build()
|
|
88
|
+
.await(DependencyInjection.httpClientService.httpClient)
|
|
89
|
+
val data = response.use { JSONObject(it.body?.string().orEmpty()) }.getJSONObject("data")
|
|
90
|
+
if (!redeems) {
|
|
91
|
+
return
|
|
92
|
+
}
|
|
93
|
+
if (!data.has("session_secret")) {
|
|
94
|
+
// Only the server error code: never log the device code or the session secret.
|
|
95
|
+
Log.w(TAG, "Could not sign in from the launch URL: ${data.optString("error")}")
|
|
96
|
+
return
|
|
97
|
+
}
|
|
98
|
+
sessionService.setSession(Session(data.getString("session_secret")))
|
|
99
|
+
}.onFailure {
|
|
100
|
+
// Only the class: the message of a JSON error can contain the response body.
|
|
101
|
+
Log.w(TAG, "Could not sign in from the launch URL: ${it.javaClass.simpleName}")
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -46,6 +46,13 @@ class SessionService(
|
|
|
46
46
|
|
|
47
47
|
val me = graphQLService.fetchMe()
|
|
48
48
|
val data = me.data
|
|
49
|
+
// The server answers a rejected session with a null `meUserActor` and no errors. Remove the
|
|
50
|
+
// session without the signed-out flag, so a launch URL can sign in again.
|
|
51
|
+
if (!me.hasErrors() && data?.meUserActor == null && _session.compareAndSet(newSession, null)) {
|
|
52
|
+
null.saveToPreferences(sessionStore)
|
|
53
|
+
httpClientService.setSession(null)
|
|
54
|
+
return@onEach
|
|
55
|
+
}
|
|
49
56
|
if (me.hasErrors() || data == null) {
|
|
50
57
|
// TODO(@lukmccall): Handle errors properly
|
|
51
58
|
_user.update { UserState.LoggedOut }
|
|
@@ -67,6 +74,8 @@ class SessionService(
|
|
|
67
74
|
|
|
68
75
|
fun setSession(newSession: Session?) {
|
|
69
76
|
newSession.saveToPreferences(sessionStore)
|
|
77
|
+
// A null session is always an explicit sign out.
|
|
78
|
+
sessionStore.edit(commit = true) { putBoolean(SIGNED_OUT_KEY, newSession == null) }
|
|
70
79
|
httpClientService.setSession(newSession?.sessionSecret)
|
|
71
80
|
_session.update { newSession }
|
|
72
81
|
}
|
|
@@ -325,6 +325,7 @@ static const NSTimeInterval EXDevLauncherDefaultRequestTimeout = 10.0;
|
|
|
325
325
|
// The dev menu params apply to every launcher command, with or without a `__expo_url`.
|
|
326
326
|
[[DevMenuManager shared] applyLaunchParamsFromURL:url];
|
|
327
327
|
[EXDevLauncherURLHelper applyDevMenuPreferencesIfNeeded:url];
|
|
328
|
+
[EXDevLauncherDeviceLogin handle:url];
|
|
328
329
|
|
|
329
330
|
if (![EXDevLauncherURLHelper hasUrlQueryParam:url]) {
|
|
330
331
|
NSURL *externalDeepLink = [EXDevLauncherURLHelper externalDeepLinkFromLauncherURL:url];
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import Foundation
|
|
4
|
+
|
|
5
|
+
/** The `__expo_device_*` params of a launch URL. */
|
|
6
|
+
internal struct DeviceLoginRequest: Equatable {
|
|
7
|
+
let deviceCode: String
|
|
8
|
+
let matchValue: String
|
|
9
|
+
let clientId: String
|
|
10
|
+
|
|
11
|
+
internal static func parse(_ url: URL) -> DeviceLoginRequest? {
|
|
12
|
+
let queryItems = URLComponents(url: url, resolvingAgainstBaseURL: false)?.queryItems ?? []
|
|
13
|
+
func query(_ name: String) -> String? {
|
|
14
|
+
guard let value = queryItems.first(where: { $0.name == name })?.value, !value.isEmpty else {
|
|
15
|
+
return nil
|
|
16
|
+
}
|
|
17
|
+
return value
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
guard let deviceCode = query("__expo_device_code"),
|
|
21
|
+
let matchValue = query("__expo_device_match"),
|
|
22
|
+
let clientId = query("__expo_device_client") else {
|
|
23
|
+
return nil
|
|
24
|
+
}
|
|
25
|
+
return DeviceLoginRequest(deviceCode: deviceCode, matchValue: matchValue, clientId: clientId)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// The server sends two digits. Another two-digit value is a failed match, not a malformed request.
|
|
29
|
+
var wrongMatchValue: String {
|
|
30
|
+
return matchValue == "00" ? "01" : "00"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Signs the launcher in from a launch URL. The tool that opens the URL (Expo CLI, Expo Orbit)
|
|
36
|
+
* creates an OAuth device code and approves it with its own session; the launcher exchanges the
|
|
37
|
+
* code for a session of its own. A failure only writes a log line: the launch continues signed out.
|
|
38
|
+
*/
|
|
39
|
+
@objc(EXDevLauncherDeviceLogin)
|
|
40
|
+
public class EXDevLauncherDeviceLogin: NSObject {
|
|
41
|
+
static let didSignInNotification = Notification.Name("EXDevLauncherDeviceLoginDidSignIn")
|
|
42
|
+
/// Set by the sign out button and removed by a manual sign in: a launch URL does not undo a sign out.
|
|
43
|
+
static let signedOutKey = "expo-device-login-signed-out"
|
|
44
|
+
|
|
45
|
+
@objc public static func handle(_ url: URL) {
|
|
46
|
+
// Simulator only: on a device, a link from another app could sign the launcher in to the
|
|
47
|
+
// sender's account. A simulator has the same risk, because the check does not look at the
|
|
48
|
+
// sender. That is the accepted risk: a launch URL can already open any project.
|
|
49
|
+
#if targetEnvironment(simulator)
|
|
50
|
+
guard let request = DeviceLoginRequest.parse(url) else {
|
|
51
|
+
return
|
|
52
|
+
}
|
|
53
|
+
let defaults = UserDefaults.standard
|
|
54
|
+
let redeems = defaults.string(forKey: APIClient.sessionKey) == nil && !defaults.bool(forKey: signedOutKey)
|
|
55
|
+
|
|
56
|
+
Task {
|
|
57
|
+
do {
|
|
58
|
+
// The app's linking listeners get this URL too. When the launcher does not redeem the code,
|
|
59
|
+
// a wrong match value makes the server reject the code from then on.
|
|
60
|
+
let data = try await exchange(request, matchValue: redeems ? request.matchValue : request.wrongMatchValue)
|
|
61
|
+
guard redeems else {
|
|
62
|
+
return
|
|
63
|
+
}
|
|
64
|
+
guard let sessionSecret = data["session_secret"] as? String else {
|
|
65
|
+
// Only the server error code: never log the device code or the session secret.
|
|
66
|
+
NSLog("DevLauncher could not sign in from the launch URL: %@", data["error"] as? String ?? "no session in the response")
|
|
67
|
+
return
|
|
68
|
+
}
|
|
69
|
+
defaults.set(sessionSecret, forKey: APIClient.sessionKey)
|
|
70
|
+
NotificationCenter.default.post(name: didSignInNotification, object: nil)
|
|
71
|
+
} catch {
|
|
72
|
+
NSLog("DevLauncher could not sign in from the launch URL: %@", error.localizedDescription)
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
#endif
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Returns the `data` object of the token response. */
|
|
79
|
+
private static func exchange(_ request: DeviceLoginRequest, matchValue: String) async throws -> [String: Any] {
|
|
80
|
+
guard let url = URL(string: "\(APIClient.shared.apiOrigin)/v2/auth/token") else {
|
|
81
|
+
return [:]
|
|
82
|
+
}
|
|
83
|
+
var urlRequest = URLRequest(url: url)
|
|
84
|
+
urlRequest.httpMethod = "POST"
|
|
85
|
+
urlRequest.setValue("application/json", forHTTPHeaderField: "Content-Type")
|
|
86
|
+
urlRequest.httpBody = try JSONSerialization.data(withJSONObject: [
|
|
87
|
+
"grant_type": "urn:ietf:params:oauth:grant-type:device_code",
|
|
88
|
+
"client_id": request.clientId,
|
|
89
|
+
"device_code": request.deviceCode,
|
|
90
|
+
"match_value": matchValue
|
|
91
|
+
])
|
|
92
|
+
urlRequest.timeoutInterval = 10
|
|
93
|
+
|
|
94
|
+
let (data, _) = try await URLSession.shared.data(for: urlRequest)
|
|
95
|
+
let json = try JSONSerialization.jsonObject(with: data) as? [String: Any]
|
|
96
|
+
return json?["data"] as? [String: Any] ?? [:]
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -7,7 +7,6 @@ import Network
|
|
|
7
7
|
import EXDevMenu
|
|
8
8
|
|
|
9
9
|
private let selectedAccountKey = "expo-selected-account-id"
|
|
10
|
-
private let sessionKey = "expo-session-secret"
|
|
11
10
|
|
|
12
11
|
private let DEV_LAUNCHER_DEFAULT_SCHEME = "expo-dev-launcher"
|
|
13
12
|
private let BONJOUR_TYPE = "_expo._tcp"
|
|
@@ -138,6 +137,16 @@ class DevLauncherViewModel: ObservableObject {
|
|
|
138
137
|
loadData()
|
|
139
138
|
checkAuthenticationStatus()
|
|
140
139
|
checkForStoredCrashes()
|
|
140
|
+
|
|
141
|
+
NotificationCenter.default.addObserver(
|
|
142
|
+
forName: EXDevLauncherDeviceLogin.didSignInNotification,
|
|
143
|
+
object: nil,
|
|
144
|
+
queue: .main
|
|
145
|
+
) { [weak self] _ in
|
|
146
|
+
Task { @MainActor [weak self] in
|
|
147
|
+
self?.checkAuthenticationStatus()
|
|
148
|
+
}
|
|
149
|
+
}
|
|
141
150
|
}
|
|
142
151
|
|
|
143
152
|
private func updateDevServers(_ servers: [DevServer]) {
|
|
@@ -612,7 +621,7 @@ class DevLauncherViewModel: ObservableObject {
|
|
|
612
621
|
}
|
|
613
622
|
|
|
614
623
|
private func checkAuthenticationStatus() {
|
|
615
|
-
let sessionSecret = UserDefaults.standard.string(forKey: sessionKey)
|
|
624
|
+
let sessionSecret = UserDefaults.standard.string(forKey: APIClient.sessionKey)
|
|
616
625
|
|
|
617
626
|
if let sessionSecret {
|
|
618
627
|
APIClient.shared.setSession(sessionSecret)
|
|
@@ -625,7 +634,7 @@ class DevLauncherViewModel: ObservableObject {
|
|
|
625
634
|
}
|
|
626
635
|
|
|
627
636
|
private func clearInvalidSession() {
|
|
628
|
-
UserDefaults.standard.removeObject(forKey: sessionKey)
|
|
637
|
+
UserDefaults.standard.removeObject(forKey: APIClient.sessionKey)
|
|
629
638
|
APIClient.shared.setSession(nil)
|
|
630
639
|
isAuthenticated = false
|
|
631
640
|
user = nil
|
|
@@ -695,7 +704,8 @@ class DevLauncherViewModel: ObservableObject {
|
|
|
695
704
|
}
|
|
696
705
|
|
|
697
706
|
func signOut() {
|
|
698
|
-
UserDefaults.standard.removeObject(forKey: sessionKey)
|
|
707
|
+
UserDefaults.standard.removeObject(forKey: APIClient.sessionKey)
|
|
708
|
+
UserDefaults.standard.set(true, forKey: EXDevLauncherDeviceLogin.signedOutKey)
|
|
699
709
|
UserDefaults.standard.removeObject(forKey: selectedAccountKey)
|
|
700
710
|
APIClient.shared.setSession(nil)
|
|
701
711
|
clearRecentlyOpenedApps()
|
|
@@ -742,7 +752,8 @@ class DevLauncherViewModel: ObservableObject {
|
|
|
742
752
|
return
|
|
743
753
|
}
|
|
744
754
|
|
|
745
|
-
UserDefaults.standard.set(sessionSecret, forKey: sessionKey)
|
|
755
|
+
UserDefaults.standard.set(sessionSecret, forKey: APIClient.sessionKey)
|
|
756
|
+
UserDefaults.standard.removeObject(forKey: EXDevLauncherDeviceLogin.signedOutKey)
|
|
746
757
|
APIClient.shared.setSession(sessionSecret)
|
|
747
758
|
continuation.resume(returning: true)
|
|
748
759
|
}
|
|
@@ -4,6 +4,8 @@ import Foundation
|
|
|
4
4
|
|
|
5
5
|
class APIClient {
|
|
6
6
|
static let shared = APIClient()
|
|
7
|
+
/// The `UserDefaults` key of the stored session secret.
|
|
8
|
+
static let sessionKey = "expo-session-secret"
|
|
7
9
|
|
|
8
10
|
private var useStaging: Bool {
|
|
9
11
|
return false
|
|
@@ -26,6 +28,12 @@ class APIClient {
|
|
|
26
28
|
: "https://exp.host/--/graphql"
|
|
27
29
|
}
|
|
28
30
|
|
|
31
|
+
var apiOrigin: String {
|
|
32
|
+
return useStaging
|
|
33
|
+
? "https://staging-api.expo.dev"
|
|
34
|
+
: "https://api.expo.dev"
|
|
35
|
+
}
|
|
36
|
+
|
|
29
37
|
var websiteOrigin: String {
|
|
30
38
|
return useStaging
|
|
31
39
|
? "https://staging.expo.dev"
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// Copyright 2015-present 650 Industries. All rights reserved.
|
|
2
|
+
|
|
3
|
+
import Testing
|
|
4
|
+
|
|
5
|
+
@testable import EXDevLauncher
|
|
6
|
+
|
|
7
|
+
@Suite("EXDevLauncherDeviceLogin")
|
|
8
|
+
struct EXDevLauncherDeviceLoginTests {
|
|
9
|
+
// The parameter names are spelled out: these are the literals Expo CLI and Expo Orbit send.
|
|
10
|
+
@Test("reads the device code, match value and client ID next to a project URL")
|
|
11
|
+
func validRequest() {
|
|
12
|
+
let url = URL(string: "exp+app://?__expo_url=http%3A%2F%2Flocalhost%3A8081&__expo_device_code=abc&__expo_device_match=42&__expo_device_client=expo-go")!
|
|
13
|
+
|
|
14
|
+
#expect(DeviceLoginRequest.parse(url) == DeviceLoginRequest(deviceCode: "abc", matchValue: "42", clientId: "expo-go"))
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@Test(
|
|
18
|
+
"rejects a URL with a missing or empty param",
|
|
19
|
+
arguments: [
|
|
20
|
+
"exp+app://?__expo_url=http%3A%2F%2Flocalhost%3A8081",
|
|
21
|
+
"exp+app://?__expo_device_match=42&__expo_device_client=expo-go",
|
|
22
|
+
"exp+app://?__expo_device_code=abc&__expo_device_client=expo-go",
|
|
23
|
+
"exp+app://?__expo_device_code=abc&__expo_device_match=42",
|
|
24
|
+
"exp+app://?__expo_device_code=&__expo_device_match=42&__expo_device_client=expo-go"
|
|
25
|
+
]
|
|
26
|
+
)
|
|
27
|
+
func incompleteRequest(_ url: String) {
|
|
28
|
+
#expect(DeviceLoginRequest.parse(URL(string: url)!) == nil)
|
|
29
|
+
}
|
|
30
|
+
}
|
package/package.json
CHANGED