diff --git a/apps/native-component-list/package.json b/apps/native-component-list/package.json index b5b799a3f3466..589fa7b19fe77 100644 --- a/apps/native-component-list/package.json +++ b/apps/native-component-list/package.json @@ -9,7 +9,7 @@ "postinstall": "expo-yarn-workspaces postinstall", "build:web": "expo build:web --no-pwa", "web": "expo start:web --https", - "eject": "SDK_VERSION=43.0.0 expo eject", + "eject": "SDK_VERSION=43.0.0 expo prebuild", "lint": "eslint .", "tsc": "tsc --noEmit -p ./tsconfig.json", "start": "expo start", diff --git a/docs/pages/bare/exploring-bare-workflow.md b/docs/pages/bare/exploring-bare-workflow.md index 456b590f40505..9247962150300 100644 --- a/docs/pages/bare/exploring-bare-workflow.md +++ b/docs/pages/bare/exploring-bare-workflow.md @@ -21,7 +21,7 @@ If you already have a React Native project that has been created with `react-nat ### Existing Expo managed workflow apps -If you already have an Expo managed workflow app and you need to customize the native code, you can eject to the bare workflow by running `expo eject`. This will give you a vanilla React Native app that includes all of the Expo SDK APIs that you were using already, and no more than that. The outcome is that you will be in just as good of a position as if you had started your app in the bare workflow from scratch, only you probably saved yourself some time! +If you already have an Expo managed workflow app and you need to customize the native code, you can generate the native projects by running `expo prebuild`. > 💡 We recommend upgrading to the latest SDK version before ejecting. It will be more difficult to upgrade your app after ejecting because you will also be responsible for native iOS and Android related upgrade steps. diff --git a/docs/pages/guides/authentication.md b/docs/pages/guides/authentication.md index 4a742b1a149f5..a5f39f6c0a6d6 100644 --- a/docs/pages/guides/authentication.md +++ b/docs/pages/guides/authentication.md @@ -527,7 +527,7 @@ Consider using the [`expo-facebook`](/versions/latest/sdk/facebook) module for n - iOS: `eas build` or `expo build:ios`. - Android: `eas build` or `expo build:android`. - **Bare:** - - Regenerate your native projects with `expo eject`, or add the redirects manually with `npx uri-scheme add fb` + - Regenerate your native projects with `expo prebuild`, or add the redirects manually with `npx uri-scheme add fb` - Rebuild the projects with `yarn ios` & `yarn android` #### Native iOS @@ -537,7 +537,7 @@ Consider using the [`expo-facebook`](/versions/latest/sdk/facebook) module for n Facebook Console for URIs -- Under iOS > Bundle ID: Add your app's bundle identifier, this should match the value in your **app.json** - `expo.ios.bundleIdentifier`. If you don't have one set, run `expo eject` to create one (then rebuild the native app). +- Under iOS > Bundle ID: Add your app's bundle identifier, this should match the value in your **app.json** - `expo.ios.bundleIdentifier`. If you don't have one set, run `expo prebuild` to create one (then rebuild the native app). - Press "Save Changes" in the footer. - Copy the "App ID" in the header into your `iosClientId: ''` or `clientId`. Ex: `{ iosClientId: '474614477183384' }` (no `fb` prefix). - Now you're ready to use the demo component in your native iOS app. @@ -549,7 +549,7 @@ Consider using the [`expo-facebook`](/versions/latest/sdk/facebook) module for n Facebook Console for URIs -- Under Android > Google Play Package Name: Add your app's android package, this should match the value in your **app.json** - `expo.android.package`. If you don't have one set, run `expo eject` to create one (then rebuild the native app). +- Under Android > Google Play Package Name: Add your app's android package, this should match the value in your **app.json** - `expo.android.package`. If you don't have one set, run `expo prebuild` to create one (then rebuild the native app). - Under Android > Class Name: This should match the package name + `.MainActivity`, i.e. `com.bacon.yolo15.MainActivity`. - Under Android > Key Hashes: You'll need to create two different values, one for Debug and one for Release. Learn how to create the [Key Hash here](https://stackoverflow.com/questions/4388992/key-hash-for-android-facebook-app). - In your app root, run: `keytool -exportcert -alias androiddebugkey -keystore android/app/debug.keystore | openssl sha1 -binary | openssl base64` you don't need a password, but it is recommended. @@ -1042,7 +1042,7 @@ This can only be used in standalone and bare workflow apps. This method cannot b - _Standalone_: Automatically added, do nothing. - _Bare workflow_: Run `npx uri-scheme add --ios` - To test this you can: - 1. Eject to bare: `expo eject` and run `yarn ios` + 1. Eject to bare: `expo prebuild` and run `yarn ios` 2. Build a simulator app: `expo build:ios -t simulator` on `eas build` 3. Build a production IPA: `expo build:ios` or `eas build` - Whenever you change the values in **app.json** you'll need to rebuild the native app. @@ -1067,7 +1067,7 @@ This can only be used in Standalone, and bare workflow apps. This method cannot - Run `expo credentials:manager -p android` then select "Update upload Keystore" -> "Generate new keystore" -> "Go back to experience overview" - Copy your "Google Certificate Fingerprint", it will output a string that looks like `A1:B2:C3` but longer. - To test this you can: - 1. Eject to bare: `expo eject` and run `yarn android` + 1. Eject to bare: `expo prebuild` and run `yarn android` 2. Build a production APK: `expo build:android` - Whenever you change the values in **app.json** you'll need to rebuild the native app. @@ -2348,7 +2348,7 @@ In some cases there will be anywhere between 1 to 3 slashes (`/`). - **Environment:** - Bare workflow - - `npx create-react-native-app` or `expo eject` + - `npx create-react-native-app` or `expo prebuild` - Standalone builds in the App or Play Store - `expo build:ios` or `expo build:android` - Standalone builds for local testing diff --git a/docs/pages/guides/config-plugins.md b/docs/pages/guides/config-plugins.md index f216930c2c7b0..890f7cce4c0c2 100644 --- a/docs/pages/guides/config-plugins.md +++ b/docs/pages/guides/config-plugins.md @@ -1082,7 +1082,7 @@ Please add the following to your Expo config [config-docs]: /versions/latest/config/app/ [prebuild-config]: https://github.com/expo/expo-cli/tree/main/packages/prebuild-config#readme -[cli-prebuild]: /workflow/expo-cli/#eject +[cli-prebuild]: /workflow/expo-cli/#expo-prebuild [configplugin]: https://github.com/expo/expo-cli/blob/3a0ef962a27525a0fe4b7e5567fb7b3fb18ec786/packages/config-plugins/src/Plugin.types.ts#L76 [source-template]: https://github.com/expo/expo/tree/main/templates/expo-template-bare-minimum [expo-beta-docs]: https://github.com/expo/expo/tree/main/guides/releasing/Release%20Workflow.md#stage-5---beta-release diff --git a/docs/pages/guides/monorepos.md b/docs/pages/guides/monorepos.md index e8bfeb997cb9c..3e277f88b2e8d 100644 --- a/docs/pages/guides/monorepos.md +++ b/docs/pages/guides/monorepos.md @@ -150,7 +150,6 @@ Like standard packages, we need to add our **cool-package** as a dependency to o "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", - "eject": "expo eject" }, "dependencies": { "cool-package": "*", diff --git a/guides/releasing/Release Workflow.md b/guides/releasing/Release Workflow.md index 03a249ce44bf6..e0b1580ba0e5f 100644 --- a/guides/releasing/Release Workflow.md +++ b/guides/releasing/Release Workflow.md @@ -43,13 +43,12 @@ - [5.10. Start release notes document](#510-start-release-notes-document) - [Stage 6 - Final release](#stage-6---final-release) - [6.1. Release Expo Go for iOS/Android to the general public](#61-release-expo-go-for-iosandroid-to-the-general-public) - - [6.2. Make adhoc client shell app for iOS](#62-make-adhoc-client-shell-app-for-ios) - - [6.3. Promote packages to latest on NPM registry](#63-promote-packages-to-latest-on-npm-registry) - - [6.4. Remove beta tag from new SDK on versions endpoint](#64-remove-beta-tag-from-new-sdk-on-versions-endpoint) - - [6.5. Remove beta tag from new SDK on Snack](#65-remove-beta-tag-from-new-sdk-on-snack) - - [6.6. Deploy final docs](#66-deploy-final-docs) - - [6.7. Publish final project templates](#67-publish-final-project-templates) - - [6.8. Press release](#68-press-release) + - [6.2. Promote packages to latest on NPM registry](#62-promote-packages-to-latest-on-npm-registry) + - [6.3. Remove beta tag from new SDK on versions endpoint](#63-remove-beta-tag-from-new-sdk-on-versions-endpoint) + - [6.4. Remove beta tag from new SDK on Snack](#64-remove-beta-tag-from-new-sdk-on-snack) + - [6.5. Deploy final docs](#65-deploy-final-docs) + - [6.6. Publish final project templates](#66-publish-final-project-templates) + - [6.7. Press release](#67-press-release) - [6.8. Follow-up](#68-follow-up) - [Stage 7 - Clean up](#stage-7---clean-up) - [7.1. Remove old SDK from Turtle](#71-remove-old-sdk-from-turtle) @@ -470,7 +469,7 @@ Once everything above is completed and Apple has approved Expo Go (iOS) for the ## 5.3. Add related packages to versions endpoint -**Why:** These package versions are used by `expo-cli` in the `eject` command to ensure that the proper versions of packages are installed in developers' projects. +**Why:** These package versions are used by `expo-cli` in the `install` command to ensure that the proper versions of packages are installed in developers' projects. **How:** diff --git a/packages/expo-auth-session/build/providers/Google.d.ts b/packages/expo-auth-session/build/providers/Google.d.ts index ab53bf2aa0b72..23a4564dad6c6 100644 --- a/packages/expo-auth-session/build/providers/Google.d.ts +++ b/packages/expo-auth-session/build/providers/Google.d.ts @@ -46,7 +46,7 @@ export interface GoogleAuthRequestConfig extends ProviderAuthRequestConfig { * - _Standalone_: Automatically added, do nothing. * - _Bare workflow_: Run `npx uri-scheme add --ios` * - To test this you can: - * 1. Eject to bare: `expo eject` and run `yarn ios` + * 1. Eject to bare: `expo prebuild` and run `yarn ios` * 2. Create a custom client: `expo client:ios` * 3. Build a production IPA: `expo build:ios` * - Whenever you change the values in `app.json` you'll need to rebuild the native app. @@ -67,7 +67,7 @@ export interface GoogleAuthRequestConfig extends ProviderAuthRequestConfig { * - Run `expo credentials:manager -p android` then select "Update upload Keystore" -> "Generate new keystore" -> "Go back to experience overview" * - Copy your "Google Certificate Fingerprint", it will output a string that looks like `A1:B2:C3` but longer. * - To test this you can: - * 1. Eject to bare: `expo eject` and run `yarn ios` + * 1. Eject to bare: `expo prebuild` and run `yarn ios` * 2. Build a production IPA: `expo build:android` */ androidClientId?: string; diff --git a/packages/expo-auth-session/build/providers/Google.js.map b/packages/expo-auth-session/build/providers/Google.js.map index 24fd5d155fdfa..3524d8fa0b330 100644 --- a/packages/expo-auth-session/build/providers/Google.js.map +++ b/packages/expo-auth-session/build/providers/Google.js.map @@ -1 +1 @@ -{"version":3,"file":"Google.js","sourceRoot":"","sources":["../../src/providers/Google.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,WAAW,EAMX,sBAAsB,EACtB,eAAe,EACf,MAAM,EACN,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE1F,MAAM,QAA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,MAAM,CAAC,CAAC;SACvB;QACD,OAAO,GAAG,EAAE;YACV,SAAS,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,QAAQ;QACR,WAAW;QACX,sBAAsB;QACtB,MAAM,CAAC,YAAY;QACnB,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC;QACxB,OAAO,EAAE,YAAY;QACrB,MAAM;KACP,CAAC,CAAC;IAEH,OAAO,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAC5C,CAAC","sourcesContent":["import * as Application from 'expo-application';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Platform } from 'react-native';\n\nimport { useAuthRequestResult, useLoadedAuthRequest } from '../AuthRequestHooks';\nimport {\n AuthRequest,\n AuthRequestConfig,\n AuthRequestPromptOptions,\n AuthSessionRedirectUriOptions,\n AuthSessionResult,\n DiscoveryDocument,\n generateHexStringAsync,\n makeRedirectUri,\n Prompt,\n ResponseType,\n} from '../AuthSession';\nimport { AccessTokenRequest } from '../TokenRequest';\nimport { ProviderAuthRequestConfig } from './Provider.types';\nimport { applyRequiredScopes, invariantClientId, useProxyEnabled } from './ProviderUtils';\n\nconst settings = {\n windowFeatures: { width: 515, height: 680 },\n minimumScopes: [\n 'openid',\n 'https://www.googleapis.com/auth/userinfo.profile',\n 'https://www.googleapis.com/auth/userinfo.email',\n ],\n};\n\nexport const discovery: DiscoveryDocument = {\n authorizationEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth',\n tokenEndpoint: 'https://oauth2.googleapis.com/token',\n revocationEndpoint: 'https://oauth2.googleapis.com/revoke',\n userInfoEndpoint: 'https://openidconnect.googleapis.com/v1/userinfo',\n};\n\n// @needsAudit\nexport interface GoogleAuthRequestConfig extends ProviderAuthRequestConfig {\n /**\n * If the user's email address is known ahead of time, it can be supplied to be the default option.\n * If the user has approved access for this app in the past then auth may return without any further interaction.\n */\n loginHint?: string;\n /**\n * When `true`, the service will allow the user to switch between accounts (if possible).\n * @default false.\n */\n selectAccount?: boolean;\n /**\n * Proxy client ID for use in the Expo client on iOS and Android.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: Web Application\n * - **URIs**: https://auth.expo.io\n * - **Authorized redirect URIs**: https://auth.expo.io/@your-username/your-project-slug\n */\n expoClientId?: string;\n /**\n * Expo web client ID for use in the browser.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: Web Application\n * - Give it a name (e.g. \"Web App\").\n * - **URIs** (Authorized JavaScript origins): https://localhost:19006 & https://yourwebsite.com\n * - **Authorized redirect URIs**: https://localhost:19006 & https://yourwebsite.com\n * - To test this be sure to start your app with `expo start:web --https`.\n */\n webClientId?: string;\n /**\n * iOS native client ID for use in standalone, bare workflow, and custom clients.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: iOS Application\n * - Give it a name (e.g. \"iOS App\").\n * - **Bundle ID**: Must match the value of `ios.bundleIdentifier` in your `app.json`.\n * - Your app needs to conform to the URI scheme matching your bundle identifier.\n * - _Standalone_: Automatically added, do nothing.\n * - _Bare workflow_: Run `npx uri-scheme add --ios`\n * - To test this you can:\n * 1. Eject to bare: `expo eject` and run `yarn ios`\n * 2. Create a custom client: `expo client:ios`\n * 3. Build a production IPA: `expo build:ios`\n * - Whenever you change the values in `app.json` you'll need to rebuild the native app.\n */\n iosClientId?: string;\n /**\n * Android native client ID for use in standalone, and bare workflow.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: Android Application\n * - Give it a name (e.g. \"Android App\").\n * - **Package name**: Must match the value of `android.package` in your `app.json`.\n * - Your app needs to conform to the URI scheme matching your `android.package` (ex. `com.myname.mycoolapp:/`).\n * - _Standalone_: Automatically added, do nothing.\n * - _Bare workflow_: Run `npx uri-scheme add --android`\n * - **Signing-certificate fingerprint**:\n * - Run `expo credentials:manager -p android` then select \"Update upload Keystore\" -> \"Generate new keystore\" -> \"Go back to experience overview\"\n * - Copy your \"Google Certificate Fingerprint\", it will output a string that looks like `A1:B2:C3` but longer.\n * - To test this you can:\n * 1. Eject to bare: `expo eject` and run `yarn ios`\n * 2. Build a production IPA: `expo build:android`\n */\n androidClientId?: string;\n /**\n * Should the hook automatically exchange the response code for an authentication token.\n *\n * Defaults to `true` on installed apps (iOS, Android) when `ResponseType.Code` is used (default).\n */\n shouldAutoExchangeCode?: boolean;\n /**\n * Language code ISO 3166-1 alpha-2 region code, such as 'it' or 'pt-PT'.\n */\n language?: string;\n}\n\n// @needsAudit\n/**\n * Extends [`AuthRequest`](#authrequest) and accepts [`GoogleAuthRequestConfig`](#googleauthrequestconfig) in the constructor.\n */\nclass GoogleAuthRequest extends AuthRequest {\n nonce?: string;\n\n constructor({\n language,\n loginHint,\n selectAccount,\n extraParams = {},\n clientSecret,\n ...config\n }: GoogleAuthRequestConfig) {\n const inputParams = {\n ...extraParams,\n };\n if (language) inputParams.hl = language;\n if (loginHint) inputParams.login_hint = loginHint;\n if (selectAccount) inputParams.prompt = Prompt.SelectAccount;\n\n // Apply the default scopes\n const scopes = applyRequiredScopes(config.scopes, settings.minimumScopes);\n const isImplicit =\n config.responseType === ResponseType.Token || config.responseType === ResponseType.IdToken;\n if (isImplicit) {\n // PKCE must be disabled in implicit mode.\n config.usePKCE = false;\n }\n let inputClientSecret: string | undefined;\n // Google will throw if you attempt to use the client secret\n if (config.responseType && config.responseType !== ResponseType.Code) {\n // TODO: maybe warn that you shouldn't store the client secret on the client\n inputClientSecret = clientSecret;\n }\n super({\n ...config,\n clientSecret: inputClientSecret,\n scopes,\n extraParams: inputParams,\n });\n }\n\n /**\n * Load and return a valid auth request based on the input config.\n */\n async getAuthRequestConfigAsync(): Promise {\n const { extraParams = {}, ...config } = await super.getAuthRequestConfigAsync();\n if (config.responseType === ResponseType.IdToken && !extraParams.nonce && !this.nonce) {\n if (!this.nonce) {\n this.nonce = await generateHexStringAsync(16);\n }\n extraParams.nonce = this.nonce;\n }\n return {\n ...config,\n extraParams,\n };\n }\n}\n\n/**\n * Load an authorization request with an ID Token for authentication with Firebase.\n *\n * Returns a loaded request, a response, and a prompt method.\n * When the prompt method completes then the response will be fulfilled.\n *\n * The id token can be retrieved with `response.params.id_token`.\n *\n * - [Get Started](https://docs.expo.dev/guides/authentication/#google)\n *\n * @param config\n * @param redirectUriOptions\n */\nexport function useIdTokenAuthRequest(\n config: Partial,\n redirectUriOptions: Partial = {}\n): [\n GoogleAuthRequest | null,\n AuthSessionResult | null,\n (options?: AuthRequestPromptOptions) => Promise\n] {\n const useProxy = useProxyEnabled(redirectUriOptions);\n\n const isWebAuth = useProxy || Platform.OS === 'web';\n\n return useAuthRequest(\n {\n ...config,\n responseType:\n // If the client secret is provided then code can be used\n !config.clientSecret &&\n // When web auth is used, we can request the `id_token` directly without exchanging a code.\n isWebAuth\n ? ResponseType.IdToken\n : undefined,\n },\n { ...redirectUriOptions, useProxy }\n );\n}\n\n/**\n * Load an authorization request.\n * Returns a loaded request, a response, and a prompt method.\n * When the prompt method completes, then the response will be fulfilled.\n *\n * - [Get Started](https://docs.expo.dev/guides/authentication/#google)\n *\n * @param config\n * @param redirectUriOptions\n */\nexport function useAuthRequest(\n config: Partial = {},\n redirectUriOptions: Partial = {}\n): [\n GoogleAuthRequest | null,\n AuthSessionResult | null,\n (options?: AuthRequestPromptOptions) => Promise\n] {\n const useProxy = useProxyEnabled(redirectUriOptions);\n\n const clientId = useMemo((): string => {\n const propertyName = useProxy\n ? 'expoClientId'\n : Platform.select({\n ios: 'iosClientId',\n android: 'androidClientId',\n default: 'webClientId',\n });\n\n const clientId = config[propertyName as any] ?? config.clientId;\n invariantClientId(propertyName, clientId, 'Google');\n return clientId;\n }, [\n useProxy,\n config.expoClientId,\n config.iosClientId,\n config.androidClientId,\n config.webClientId,\n config.clientId,\n ]);\n\n const responseType = useMemo(() => {\n // Allow overrides.\n if (typeof config.responseType !== 'undefined') {\n return config.responseType;\n }\n // You can only use `response_token=code` on installed apps (iOS, Android without proxy).\n // Installed apps can auto exchange without a client secret and get the token and id-token (Firebase).\n const isInstalledApp = Platform.OS !== 'web' && !useProxy;\n // If the user provided the client secret (they shouldn't!) then use code exchange by default.\n if (config.clientSecret || isInstalledApp) {\n return ResponseType.Code;\n }\n // This seems the most pragmatic option since it can result in a full authentication on web and proxy platforms as expected.\n return ResponseType.Token;\n }, [config.responseType, config.clientSecret, useProxy]);\n\n const redirectUri = useMemo((): string => {\n if (typeof config.redirectUri !== 'undefined') {\n return config.redirectUri;\n }\n\n return makeRedirectUri({\n native: `${Application.applicationId}:/oauthredirect`,\n useProxy,\n ...redirectUriOptions,\n // native: `com.googleusercontent.apps.${guid}:/oauthredirect`,\n });\n }, [useProxy, config.redirectUri, redirectUriOptions]);\n\n const extraParams = useMemo((): GoogleAuthRequestConfig['extraParams'] => {\n const output = config.extraParams ? { ...config.extraParams } : {};\n\n if (config.language) {\n output.hl = output.language;\n }\n if (config.loginHint) {\n output.login_hint = output.loginHint;\n }\n if (config.selectAccount) {\n output.prompt = Prompt.SelectAccount;\n }\n return output;\n }, [config.extraParams, config.language, config.loginHint, config.selectAccount]);\n\n const request = useLoadedAuthRequest(\n {\n ...config,\n responseType,\n extraParams,\n clientId,\n redirectUri,\n },\n discovery,\n GoogleAuthRequest\n );\n\n const [result, promptAsync] = useAuthRequestResult(request, discovery, {\n useProxy,\n windowFeatures: settings.windowFeatures,\n });\n\n const [fullResult, setFullResult] = useState(null);\n\n const shouldAutoExchangeCode = useMemo(() => {\n // allow overrides\n if (typeof config.shouldAutoExchangeCode !== 'undefined') {\n return config.shouldAutoExchangeCode;\n }\n\n // has a code to exchange and doesn't have an authentication yet.\n return result?.type === 'success' && result.params.code && !result.authentication;\n }, [config.shouldAutoExchangeCode, result?.type]);\n\n useEffect(() => {\n let isMounted = true;\n if (shouldAutoExchangeCode && result?.type === 'success') {\n const exchangeRequest = new AccessTokenRequest({\n clientId,\n clientSecret: config.clientSecret,\n redirectUri,\n scopes: config.scopes,\n code: result.params.code,\n extraParams: {\n code_verifier: request?.codeVerifier || '',\n },\n });\n exchangeRequest.performAsync(discovery).then((authentication) => {\n if (isMounted) {\n setFullResult({\n ...result,\n params: {\n id_token: authentication?.idToken || '',\n access_token: authentication.accessToken,\n ...result.params,\n },\n authentication,\n });\n }\n });\n } else {\n setFullResult(result);\n }\n return () => {\n isMounted = false;\n };\n }, [\n clientId,\n redirectUri,\n shouldAutoExchangeCode,\n config.clientSecret,\n config.scopes?.join(','),\n request?.codeVerifier,\n result,\n ]);\n\n return [request, fullResult, promptAsync];\n}\n"]} \ No newline at end of file +{"version":3,"file":"Google.js","sourceRoot":"","sources":["../../src/providers/Google.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACjF,OAAO,EACL,WAAW,EAMX,sBAAsB,EACtB,eAAe,EACf,MAAM,EACN,YAAY,GACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAE1F,MAAM,QAAQ,GAAG;IACf,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC3C,aAAa,EAAE;QACb,QAAQ;QACR,kDAAkD;QAClD,gDAAgD;KACjD;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAsB;IAC1C,qBAAqB,EAAE,8CAA8C;IACrE,aAAa,EAAE,qCAAqC;IACpD,kBAAkB,EAAE,sCAAsC;IAC1D,gBAAgB,EAAE,kDAAkD;CACrE,CAAC;AAqFF,cAAc;AACd;;GAEG;AAC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AAC","sourcesContent":["import * as Application from 'expo-application';\nimport { useEffect, useMemo, useState } from 'react';\nimport { Platform } from 'react-native';\n\nimport { useAuthRequestResult, useLoadedAuthRequest } from '../AuthRequestHooks';\nimport {\n AuthRequest,\n AuthRequestConfig,\n AuthRequestPromptOptions,\n AuthSessionRedirectUriOptions,\n AuthSessionResult,\n DiscoveryDocument,\n generateHexStringAsync,\n makeRedirectUri,\n Prompt,\n ResponseType,\n} from '../AuthSession';\nimport { AccessTokenRequest } from '../TokenRequest';\nimport { ProviderAuthRequestConfig } from './Provider.types';\nimport { applyRequiredScopes, invariantClientId, useProxyEnabled } from './ProviderUtils';\n\nconst settings = {\n windowFeatures: { width: 515, height: 680 },\n minimumScopes: [\n 'openid',\n 'https://www.googleapis.com/auth/userinfo.profile',\n 'https://www.googleapis.com/auth/userinfo.email',\n ],\n};\n\nexport const discovery: DiscoveryDocument = {\n authorizationEndpoint: 'https://accounts.google.com/o/oauth2/v2/auth',\n tokenEndpoint: 'https://oauth2.googleapis.com/token',\n revocationEndpoint: 'https://oauth2.googleapis.com/revoke',\n userInfoEndpoint: 'https://openidconnect.googleapis.com/v1/userinfo',\n};\n\n// @needsAudit\nexport interface GoogleAuthRequestConfig extends ProviderAuthRequestConfig {\n /**\n * If the user's email address is known ahead of time, it can be supplied to be the default option.\n * If the user has approved access for this app in the past then auth may return without any further interaction.\n */\n loginHint?: string;\n /**\n * When `true`, the service will allow the user to switch between accounts (if possible).\n * @default false.\n */\n selectAccount?: boolean;\n /**\n * Proxy client ID for use in the Expo client on iOS and Android.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: Web Application\n * - **URIs**: https://auth.expo.io\n * - **Authorized redirect URIs**: https://auth.expo.io/@your-username/your-project-slug\n */\n expoClientId?: string;\n /**\n * Expo web client ID for use in the browser.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: Web Application\n * - Give it a name (e.g. \"Web App\").\n * - **URIs** (Authorized JavaScript origins): https://localhost:19006 & https://yourwebsite.com\n * - **Authorized redirect URIs**: https://localhost:19006 & https://yourwebsite.com\n * - To test this be sure to start your app with `expo start:web --https`.\n */\n webClientId?: string;\n /**\n * iOS native client ID for use in standalone, bare workflow, and custom clients.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: iOS Application\n * - Give it a name (e.g. \"iOS App\").\n * - **Bundle ID**: Must match the value of `ios.bundleIdentifier` in your `app.json`.\n * - Your app needs to conform to the URI scheme matching your bundle identifier.\n * - _Standalone_: Automatically added, do nothing.\n * - _Bare workflow_: Run `npx uri-scheme add --ios`\n * - To test this you can:\n * 1. Eject to bare: `expo eject` and run `yarn ios`\n * 2. Create a custom client: `expo client:ios`\n * 3. Build a production IPA: `expo build:ios`\n * - Whenever you change the values in `app.json` you'll need to rebuild the native app.\n */\n iosClientId?: string;\n /**\n * Android native client ID for use in standalone, and bare workflow.\n *\n * This Google Client ID must be setup as follows:\n *\n * - **Application Type**: Android Application\n * - Give it a name (e.g. \"Android App\").\n * - **Package name**: Must match the value of `android.package` in your `app.json`.\n * - Your app needs to conform to the URI scheme matching your `android.package` (ex. `com.myname.mycoolapp:/`).\n * - _Standalone_: Automatically added, do nothing.\n * - _Bare workflow_: Run `npx uri-scheme add --android`\n * - **Signing-certificate fingerprint**:\n * - Run `expo credentials:manager -p android` then select \"Update upload Keystore\" -> \"Generate new keystore\" -> \"Go back to experience overview\"\n * - Copy your \"Google Certificate Fingerprint\", it will output a string that looks like `A1:B2:C3` but longer.\n * - To test this you can:\n * 1. Eject to bare: `expo eject` and run `yarn ios`\n * 2. Build a production IPA: `expo build:android`\n */\n androidClientId?: string;\n /**\n * Should the hook automatically exchange the response code for an authentication token.\n *\n * Defaults to `true` on installed apps (iOS, Android) when `ResponseType.Code` is used (default).\n */\n shouldAutoExchangeCode?: boolean;\n /**\n * Language code ISO 3166-1 alpha-2 region code, such as 'it' or 'pt-PT'.\n */\n language?: string;\n}\n\n// @needsAudit\n/**\n * Extends [`AuthRequest`](#authrequest) and accepts [`GoogleAuthRequestConfig`](#googleauthrequestconfig) in the constructor.\n */\nclass GoogleAuthRequest extends AuthRequest {\n nonce?: string;\n\n constructor({\n language,\n loginHint,\n selectAccount,\n extraParams = {},\n clientSecret,\n ...config\n }: GoogleAuthRequestConfig) {\n const inputParams = {\n ...extraParams,\n };\n if (language) inputParams.hl = language;\n if (loginHint) inputParams.login_hint = loginHint;\n if (selectAccount) inputParams.prompt = Prompt.SelectAccount;\n\n // Apply the default scopes\n const scopes = applyRequiredScopes(config.scopes, settings.minimumScopes);\n const isImplicit =\n config.responseType === ResponseType.Token || config.responseType === ResponseType.IdToken;\n if (isImplicit) {\n // PKCE must be disabled in implicit mode.\n config.usePKCE = false;\n }\n let inputClientSecret: string | undefined;\n // Google will throw if you attempt to use the client secret\n if (config.responseType && config.responseType !== ResponseType.Code) {\n // TODO: maybe warn that you shouldn't store the client secret on the client\n inputClientSecret = clientSecret;\n }\n super({\n ...config,\n clientSecret: inputClientSecret,\n scopes,\n extraParams: inputParams,\n });\n }\n\n /**\n * Load and return a valid auth request based on the input config.\n */\n async getAuthRequestConfigAsync(): Promise {\n const { extraParams = {}, ...config } = await super.getAuthRequestConfigAsync();\n if (config.responseType === ResponseType.IdToken && !extraParams.nonce && !this.nonce) {\n if (!this.nonce) {\n this.nonce = await generateHexStringAsync(16);\n }\n extraParams.nonce = this.nonce;\n }\n return {\n ...config,\n extraParams,\n };\n }\n}\n\n/**\n * Load an authorization request with an ID Token for authentication with Firebase.\n *\n * Returns a loaded request, a response, and a prompt method.\n * When the prompt method completes then the response will be fulfilled.\n *\n * The id token can be retrieved with `response.params.id_token`.\n *\n * - [Get Started](https://docs.expo.dev/guides/authentication/#google)\n *\n * @param config\n * @param redirectUriOptions\n */\nexport function useIdTokenAuthRequest(\n config: Partial,\n redirectUriOptions: Partial = {}\n): [\n GoogleAuthRequest | null,\n AuthSessionResult | null,\n (options?: AuthRequestPromptOptions) => Promise\n] {\n const useProxy = useProxyEnabled(redirectUriOptions);\n\n const isWebAuth = useProxy || Platform.OS === 'web';\n\n return useAuthRequest(\n {\n ...config,\n responseType:\n // If the client secret is provided then code can be used\n !config.clientSecret &&\n // When web auth is used, we can request the `id_token` directly without exchanging a code.\n isWebAuth\n ? ResponseType.IdToken\n : undefined,\n },\n { ...redirectUriOptions, useProxy }\n );\n}\n\n/**\n * Load an authorization request.\n * Returns a loaded request, a response, and a prompt method.\n * When the prompt method completes, then the response will be fulfilled.\n *\n * - [Get Started](https://docs.expo.dev/guides/authentication/#google)\n *\n * @param config\n * @param redirectUriOptions\n */\nexport function useAuthRequest(\n config: Partial = {},\n redirectUriOptions: Partial = {}\n): [\n GoogleAuthRequest | null,\n AuthSessionResult | null,\n (options?: AuthRequestPromptOptions) => Promise\n] {\n const useProxy = useProxyEnabled(redirectUriOptions);\n\n const clientId = useMemo((): string => {\n const propertyName = useProxy\n ? 'expoClientId'\n : Platform.select({\n ios: 'iosClientId',\n android: 'androidClientId',\n default: 'webClientId',\n });\n\n const clientId = config[propertyName as any] ?? config.clientId;\n invariantClientId(propertyName, clientId, 'Google');\n return clientId;\n }, [\n useProxy,\n config.expoClientId,\n config.iosClientId,\n config.androidClientId,\n config.webClientId,\n config.clientId,\n ]);\n\n const responseType = useMemo(() => {\n // Allow overrides.\n if (typeof config.responseType !== 'undefined') {\n return config.responseType;\n }\n // You can only use `response_token=code` on installed apps (iOS, Android without proxy).\n // Installed apps can auto exchange without a client secret and get the token and id-token (Firebase).\n const isInstalledApp = Platform.OS !== 'web' && !useProxy;\n // If the user provided the client secret (they shouldn't!) then use code exchange by default.\n if (config.clientSecret || isInstalledApp) {\n return ResponseType.Code;\n }\n // This seems the most pragmatic option since it can result in a full authentication on web and proxy platforms as expected.\n return ResponseType.Token;\n }, [config.responseType, config.clientSecret, useProxy]);\n\n const redirectUri = useMemo((): string => {\n if (typeof config.redirectUri !== 'undefined') {\n return config.redirectUri;\n }\n\n return makeRedirectUri({\n native: `${Application.applicationId}:/oauthredirect`,\n useProxy,\n ...redirectUriOptions,\n // native: `com.googleusercontent.apps.${guid}:/oauthredirect`,\n });\n }, [useProxy, config.redirectUri, redirectUriOptions]);\n\n const extraParams = useMemo((): GoogleAuthRequestConfig['extraParams'] => {\n const output = config.extraParams ? { ...config.extraParams } : {};\n\n if (config.language) {\n output.hl = output.language;\n }\n if (config.loginHint) {\n output.login_hint = output.loginHint;\n }\n if (config.selectAccount) {\n output.prompt = Prompt.SelectAccount;\n }\n return output;\n }, [config.extraParams, config.language, config.loginHint, config.selectAccount]);\n\n const request = useLoadedAuthRequest(\n {\n ...config,\n responseType,\n extraParams,\n clientId,\n redirectUri,\n },\n discovery,\n GoogleAuthRequest\n );\n\n const [result, promptAsync] = useAuthRequestResult(request, discovery, {\n useProxy,\n windowFeatures: settings.windowFeatures,\n });\n\n const [fullResult, setFullResult] = useState(null);\n\n const shouldAutoExchangeCode = useMemo(() => {\n // allow overrides\n if (typeof config.shouldAutoExchangeCode !== 'undefined') {\n return config.shouldAutoExchangeCode;\n }\n\n // has a code to exchange and doesn't have an authentication yet.\n return result?.type === 'success' && result.params.code && !result.authentication;\n }, [config.shouldAutoExchangeCode, result?.type]);\n\n useEffect(() => {\n let isMounted = true;\n if (shouldAutoExchangeCode && result?.type === 'success') {\n const exchangeRequest = new AccessTokenRequest({\n clientId,\n clientSecret: config.clientSecret,\n redirectUri,\n scopes: config.scopes,\n code: result.params.code,\n extraParams: {\n code_verifier: request?.codeVerifier || '',\n },\n });\n exchangeRequest.performAsync(discovery).then((authentication) => {\n if (isMounted) {\n setFullResult({\n ...result,\n params: {\n id_token: authentication?.idToken || '',\n access_token: authentication.accessToken,\n ...result.params,\n },\n authentication,\n });\n }\n });\n } else {\n setFullResult(result);\n }\n return () => {\n isMounted = false;\n };\n }, [\n clientId,\n redirectUri,\n shouldAutoExchangeCode,\n config.clientSecret,\n config.scopes?.join(','),\n request?.codeVerifier,\n result,\n ]);\n\n return [request, fullResult, promptAsync];\n}\n"]} diff --git a/packages/expo-auth-session/src/providers/Google.ts b/packages/expo-auth-session/src/providers/Google.ts index ffce7ecb9de4e..cc63a194fbba9 100644 --- a/packages/expo-auth-session/src/providers/Google.ts +++ b/packages/expo-auth-session/src/providers/Google.ts @@ -81,7 +81,7 @@ export interface GoogleAuthRequestConfig extends ProviderAuthRequestConfig { * - _Standalone_: Automatically added, do nothing. * - _Bare workflow_: Run `npx uri-scheme add --ios` * - To test this you can: - * 1. Eject to bare: `expo eject` and run `yarn ios` + * 1. Prebuild to generate the native files: `expo prebuild` and run `yarn ios` * 2. Create a custom client: `expo client:ios` * 3. Build a production IPA: `expo build:ios` * - Whenever you change the values in `app.json` you'll need to rebuild the native app. @@ -102,7 +102,7 @@ export interface GoogleAuthRequestConfig extends ProviderAuthRequestConfig { * - Run `expo credentials:manager -p android` then select "Update upload Keystore" -> "Generate new keystore" -> "Go back to experience overview" * - Copy your "Google Certificate Fingerprint", it will output a string that looks like `A1:B2:C3` but longer. * - To test this you can: - * 1. Eject to bare: `expo eject` and run `yarn ios` + * 1. Prebuild to generate the native files: `expo prebuild` and run `yarn ios` * 2. Build a production IPA: `expo build:android` */ androidClientId?: string; diff --git a/packages/expo-document-picker/README.md b/packages/expo-document-picker/README.md index 70db98920ecfe..7f7579591965e 100644 --- a/packages/expo-document-picker/README.md +++ b/packages/expo-document-picker/README.md @@ -45,7 +45,7 @@ You can change the `com.apple.developer.icloud-container-environment` entitlemen } ``` -> Running `expo prebuild` will generate a the [native project locally](https://docs.expo.io/workflow/customizing/) with the applied changes in your iOS Entitlements file. +> Running `expo prebuild` will generate the [native project locally](https://docs.expo.io/workflow/customizing/) with the applied changes in your iOS Entitlements file. # Contributing diff --git a/packages/expo-updates/README.md b/packages/expo-updates/README.md index 5d1c3f9e7cd47..c3587cfe55705 100644 --- a/packages/expo-updates/README.md +++ b/packages/expo-updates/README.md @@ -118,7 +118,7 @@ In `expo-updates@0.9.0` and above, we support automatic installation of the modu # Removing pre-installed expo-updates -Projects created by `expo init` and `expo eject` come with expo-updates pre-installed, because we anticipate most users will want this functionality. However, if you do not intend to use OTA updates, you can disable or uninstall the module. +Projects created by `expo init` and `expo prebuild` come with expo-updates pre-installed, because we anticipate most users will want this functionality. However, if you do not intend to use OTA updates, you can disable or uninstall the module. ## Disabling expo-updates diff --git a/packages/expo-yarn-workspaces/workspace-template/package.json b/packages/expo-yarn-workspaces/workspace-template/package.json index 2586a920f824e..306b19d626fdd 100644 --- a/packages/expo-yarn-workspaces/workspace-template/package.json +++ b/packages/expo-yarn-workspaces/workspace-template/package.json @@ -5,7 +5,6 @@ "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", - "eject": "expo eject", "postinstall": "expo-yarn-workspaces check-workspace-dependencies" }, "workspaces": [ diff --git a/templates/expo-template-blank-typescript/package.json b/templates/expo-template-blank-typescript/package.json index b462d2eba6df5..e8df5770c8575 100644 --- a/templates/expo-template-blank-typescript/package.json +++ b/templates/expo-template-blank-typescript/package.json @@ -7,8 +7,7 @@ "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", - "web": "expo start --web", - "eject": "expo eject" + "web": "expo start --web" }, "dependencies": { "expo": "~45.0.0-beta.4", diff --git a/templates/expo-template-blank/package.json b/templates/expo-template-blank/package.json index 4cda358f46409..3f2476d0b5819 100644 --- a/templates/expo-template-blank/package.json +++ b/templates/expo-template-blank/package.json @@ -7,8 +7,7 @@ "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", - "web": "expo start --web", - "eject": "expo eject" + "web": "expo start --web" }, "dependencies": { "expo": "~45.0.0-beta.4", diff --git a/templates/expo-template-tabs/package.json b/templates/expo-template-tabs/package.json index e6b62a5eda5e2..4e05cbac3a73c 100644 --- a/templates/expo-template-tabs/package.json +++ b/templates/expo-template-tabs/package.json @@ -8,7 +8,6 @@ "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", - "eject": "expo eject", "test": "jest --watchAll" }, "jest": {