From f42437f7dd3e52878dc5f59d4b4338becd8ea2e3 Mon Sep 17 00:00:00 2001 From: Cedric van Putten Date: Mon, 5 Oct 2020 17:38:01 +0200 Subject: [PATCH] [docs] Escape inline code block pipes in tables (#10550) * [docs] Escape inline-codeblock pipes in tables * [docs] Escape all special characters in app auth 39.0.0 --- docs/pages/guides/progressive-web-apps.md | 44 ++++++----- .../sending-notifications.md | 28 +++---- .../versions/unversioned/sdk/app-auth.md | 69 +++++++++-------- .../versions/unversioned/sdk/auth-session.md | 43 ++++++----- .../versions/unversioned/sdk/barometer.md | 9 ++- .../unversioned/sdk/firebase-analytics.md | 17 ++-- docs/pages/versions/unversioned/sdk/google.md | 69 +++++++++-------- docs/pages/versions/v35.0.0/sdk/app-auth.md | 77 ++++++++++--------- docs/pages/versions/v35.0.0/sdk/barometer.md | 20 ++--- docs/pages/versions/v35.0.0/sdk/google.md | 74 +++++++++--------- docs/pages/versions/v36.0.0/sdk/app-auth.md | 69 +++++++++-------- docs/pages/versions/v36.0.0/sdk/barometer.md | 9 ++- docs/pages/versions/v36.0.0/sdk/google.md | 67 ++++++++-------- docs/pages/versions/v37.0.0/sdk/app-auth.md | 69 +++++++++-------- .../versions/v37.0.0/sdk/auth-session.md | 15 ++-- docs/pages/versions/v37.0.0/sdk/barometer.md | 9 ++- .../v37.0.0/sdk/firebase-analytics.md | 17 ++-- docs/pages/versions/v37.0.0/sdk/google.md | 67 ++++++++-------- docs/pages/versions/v38.0.0/sdk/app-auth.md | 69 +++++++++-------- .../versions/v38.0.0/sdk/auth-session.md | 15 ++-- docs/pages/versions/v38.0.0/sdk/barometer.md | 9 ++- .../v38.0.0/sdk/firebase-analytics.md | 17 ++-- docs/pages/versions/v38.0.0/sdk/google.md | 69 +++++++++-------- docs/pages/versions/v39.0.0/sdk/app-auth.md | 69 +++++++++-------- .../versions/v39.0.0/sdk/auth-session.md | 41 +++++----- docs/pages/versions/v39.0.0/sdk/barometer.md | 9 ++- .../v39.0.0/sdk/firebase-analytics.md | 15 ++-- docs/pages/versions/v39.0.0/sdk/google.md | 69 +++++++++-------- 28 files changed, 593 insertions(+), 561 deletions(-) diff --git a/docs/pages/guides/progressive-web-apps.md b/docs/pages/guides/progressive-web-apps.md index f21f001513258..10b12538b1fc7 100644 --- a/docs/pages/guides/progressive-web-apps.md +++ b/docs/pages/guides/progressive-web-apps.md @@ -2,6 +2,8 @@ title: Progressive Web Apps --- +import { InlineCode } from '~/components/base/code'; + A progressive web app (or PWA for short) is a website that can be installed on the user's device and used offline. If you build your native app with Expo, then Expo CLI can generate a lot of the PWA automatically based on how the native app works. Ex: icons, splash screens, orientation, etc. Just [enable service workers](https://expo.fyi/enabling-web-service-workers) to get a complete PWA. You can test your PWA in an Emulator and Simulator by running `expo start:web --ios --android` then installing the PWA via the mobile browser. @@ -14,27 +16,27 @@ When you run `expo build:web` the Webpack config reads your `app.config.js` (or The following properties can be used to customize your PWA: -| `app.config.js` | `manifest.json` | `index.html` | -| ---------------------------------- | ----------------------------- | ------------------------------------------------------- | -| `web.backgroundColor` | `background_color` | | -| `web.description | description` | `description` | `` | -| `web.dir` | `dir` | | -| `web.display` | `display` | | -| `web.lang` | `lang` | `` | -| `web.name | name` | `name` | `` | -| `web.orientation | orientation` | `orientation` | | -| `web.scope` | `scope` | | -| `web.shortName | web.name` | `short_name` | `<meta name="apple-mobile-web-app-title"/>` | -| `web.startUrl` | `start_url` | | -| `web.themeColor | primaryColor` | `theme_color` | `<meta name="theme-color" />` | -| `web.crossorigin` | `crossorigin` | | -| `web.relatedApplications` | `related_applications` | | -| `web.preferRelatedApplications` | `prefer_related_applications` | | -| `android.icon | icon` | `icons` | | -| `ios.icon | icon` | | `<link rel="apple-touch-icon" >` | -| `web.favicon | icon` | | `<link rel="shortcut icon" >` | -| `web.barStyle` | | `<meta name="apple-mobile-web-app-status-bar-style" />` | -| `web.splash | ios.splash | splash` | | `<link rel="apple-touch-startup-image" >` | +| `app.config.js` | `manifest.json` | `index.html` | +| ----------------------------------------------------------- | ----------------------------- | ------------------------------------------------------- | +| `web.backgroundColor` | `background_color` | | +| <InlineCode>web.description \| description</InlineCode> | `description` | `<meta name="description" />` | +| `web.dir` | `dir` | | +| `web.display` | `display` | | +| `web.lang` | `lang` | `<html lang="">` | +| <InlineCode>web.name \| name</InlineCode> | `name` | `<title />` | +| <InlineCode>web.orientation \| orientation</InlineCode> | `orientation` | | +| `web.scope` | `scope` | | +| <InlineCode>web.shortName \| web.name</InlineCode> | `short_name` | `<meta name="apple-mobile-web-app-title"/>` | +| `web.startUrl` | `start_url` | | +| <InlineCode>web.themeColor \| primaryColor</InlineCode> | `theme_color` | `<meta name="theme-color" />` | +| `web.crossorigin` | `crossorigin` | | +| `web.relatedApplications` | `related_applications` | | +| `web.preferRelatedApplications` | `prefer_related_applications` | | +| <InlineCode>android.icon \| icon</InlineCode> | `icons` | | +| <InlineCode>ios.icon \| icon</InlineCode> | | `<link rel="apple-touch-icon" >` | +| <InlineCode>web.favicon \| icon</InlineCode> | | `<link rel="shortcut icon" >` | +| `web.barStyle` | | `<meta name="apple-mobile-web-app-status-bar-style" />` | +| <InlineCode>web.splash \| ios.splash \| splash</InlineCode> | | `<link rel="apple-touch-startup-image" >` | If you need finer control on how the PWA is generated, you should eject the `web/index.html` and add it there. diff --git a/docs/pages/push-notifications/sending-notifications.md b/docs/pages/push-notifications/sending-notifications.md index da573689b9685..34391648ae2c1 100644 --- a/docs/pages/push-notifications/sending-notifications.md +++ b/docs/pages/push-notifications/sending-notifications.md @@ -3,6 +3,8 @@ title: Sending Notifications with Expo's Push API sidebar_title: Sending Notifications with Expo --- +import { InlineCode } from '~/components/base/code'; + > If you're just getting started and want to focus on the front-end for now, you can skip this step and just use [Expo's push notification tool](https://expo.io/notifications) to send notifications with the click of a button. Along with the [`expo-notifications`](../../versions/latest/sdk/notifications/) module, which provides all the client-side functionality for push notifications, Expo can also handle sending these notifications off to APNs and FCM for you! All you need to do is send the request to our servers with the ExpoPushToken you grabbed in the last step. @@ -196,19 +198,19 @@ If there's an error with the entire request for either push tickets or push rece Each message must be a JSON object with the given fields (only the `to` field is required): -| Field | Platform? | Type | Description | -| ------------ | ------------- | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `to` | iOS & Android | `string | string[]` | An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message. | -| `data` | iOS & Android | `Object` | A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error. | -| `title` | iOS & Android | `string` | The title to display in the notification. Often displayed above the notification body | -| `body` | iOS & Android | `string` | The message to display in the notification. | -| `ttl` | iOS & Android | `number` | Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to `undefined` in order to use the respective defaults of each provider (0 for iOS/APNs and 2419200 (4 weeks) for Android/FCM). | -| `expiration` | iOS & Android | `number` | Timestamp since the UNIX epoch specifying when the message expires. Same effect as `ttl` (`ttl` takes precedence over `expiration`). | -| `priority` | iOS & Android | `'default' | 'normal' | 'high'` | The delivery priority of the message. Specify "default" or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS). | -| `subtitle` | iOS Only | `string` | The subtitle to display in the notification below the title. | -| `sound` | iOS Only | `'default' | null` | Play a sound when the recipient receives this notification. Specify `"default"` to play the device's default notification sound, or omit this field to play no sound. | -| `badge` | iOS Only | `number` | Number to display in the badge on the app icon. Specify zero to clear the badge. | -| `channelId` | Android Only | `string` | ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (i.e. has not yet been created by your app), the notification will not be displayed to the user. | +| Field | Platform? | Type | Description | +| ------------ | ------------- | -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `to` | iOS & Android | <InlineCode>string \| string[]</InlineCode> | An Expo push token or an array of Expo push tokens specifying the recipient(s) of this message. | +| `data` | iOS & Android | `Object` | A JSON object delivered to your app. It may be up to about 4KiB; the total notification payload sent to Apple and Google must be at most 4KiB or else you will get a "Message Too Big" error. | +| `title` | iOS & Android | `string` | The title to display in the notification. Often displayed above the notification body | +| `body` | iOS & Android | `string` | The message to display in the notification. | +| `ttl` | iOS & Android | `number` | Time to Live: the number of seconds for which the message may be kept around for redelivery if it hasn't been delivered yet. Defaults to `undefined` in order to use the respective defaults of each provider (0 for iOS/APNs and 2419200 (4 weeks) for Android/FCM). | +| `expiration` | iOS & Android | `number` | Timestamp since the UNIX epoch specifying when the message expires. Same effect as `ttl` (`ttl` takes precedence over `expiration`). | +| `priority` | iOS & Android | <InlineCode>'default' \| 'normal' \| 'high'</InlineCode> | The delivery priority of the message. Specify "default" or omit this field to use the default priority on each platform ("normal" on Android and "high" on iOS). | +| `subtitle` | iOS Only | `string` | The subtitle to display in the notification below the title. | +| `sound` | iOS Only | <InlineCode>'default' \| null</InlineCode> | Play a sound when the recipient receives this notification. Specify `"default"` to play the device's default notification sound, or omit this field to play no sound. | +| `badge` | iOS Only | `number` | Number to display in the badge on the app icon. Specify zero to clear the badge. | +| `channelId` | Android Only | `string` | ID of the Notification Channel through which to display this notification. If an ID is specified but the corresponding channel does not exist on the device (i.e. has not yet been created by your app), the notification will not be displayed to the user. | **Note on `ttl`**: On Android, we make a best effort to deliver messages with zero TTL immediately and do not throttle them. However, setting TTL to a low value (e.g. zero) can prevent normal-priority notifications from ever reaching Android devices that are in doze mode. In order to guarantee that a notification will be delivered, TTL must be long enough for the device to wake from doze mode. This field takes precedence over `expiration` when both are specified. diff --git a/docs/pages/versions/unversioned/sdk/app-auth.md b/docs/pages/versions/unversioned/sdk/app-auth.md index 101ae5673238d..7ba35b3d8915c 100644 --- a/docs/pages/versions/unversioned/sdk/app-auth.md +++ b/docs/pages/versions/unversioned/sdk/app-auth.md @@ -8,6 +8,7 @@ import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import { H3 } from '~/components/plugins/Headings'; +import { InlineCode } from '~/components/base/code'; > ⚠️ For web support and more authentication methods, use the new [**AuthSession**](../auth-session) API @@ -319,14 +320,14 @@ Return value of the following `AppAuth` methods: - `AppAuth.authAsync()` - `AppAuth.refreshAsync()` -| Name | Type | Description | -| ------------------------- | -------------------------- | ----------------------------------------------------------------------------------------- | -| accessToken | `string \| null` | Access token generated by the auth server | -| accessTokenExpirationDate | `string \| null` | Approximate expiration date and time of the access token | -| additionalParameters | `{ [string]: any } \| null` | Additional parameters returned from the auth server | -| idToken | `string \| null` | ID Token value associated with the authenticated session | -| tokenType | `string \| null` | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | -| refreshToken | `string \| undefined` | The most recent refresh token received from the auth server | +| Name | Type | Description | +| ------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------- | +| accessToken | <InlineCode>string \| null</InlineCode> | Access token generated by the auth server | +| accessTokenExpirationDate | <InlineCode>string \| null</InlineCode> | Approximate expiration date and time of the access token | +| additionalParameters | <InlineCode>\{ \[string\]: any \} \| null</InlineCode> | Additional parameters returned from the auth server | +| idToken | <InlineCode>string \| null</InlineCode> | ID Token value associated with the authenticated session | +| tokenType | <InlineCode>string \| null</InlineCode> | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | +| refreshToken | <InlineCode>string \| undefined</InlineCode> | The most recent refresh token received from the auth server | ### `OAuthBaseProps` @@ -340,16 +341,16 @@ Return value of the following `AppAuth` methods: extends `OAuthBaseProps`, is used to create OAuth flows. -| Name | Type | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------- | -| clientId | `string` | The client identifier | -| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | -| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | -| clientSecret | `string \| undefined` | used to prove that identity of the client when exchaning an authorization code for an access token | -| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | `Array\<string\> \| undefined` | a list of space-delimited, case-sensitive strings define the scope of the access requested | -| redirectUrl | `string \| undefined` | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | -| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | -| canMakeInsecureRequests | `boolean \| undefined` | **Android: Only** enables the use of HTTP requests | +| Name | Type | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| clientId | `string` | The client identifier | +| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | +| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | +| clientSecret | <InlineCode>string \| undefined</InlineCode> | used to prove that identity of the client when exchaning an authorization code for an access token | +| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | <InlineCode>Array<string\> \| undefined</InlineCode> | a list of space-delimited, case-sensitive strings define the scope of the access requested | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | +| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | +| canMakeInsecureRequests | <InlineCode>boolean \| undefined</InlineCode> | **Android: Only** enables the use of HTTP requests | ### `OAuthRevokeOptions` @@ -360,28 +361,28 @@ extends `OAuthBaseProps`, is used to create OAuth flows. ### `OAuthServiceConfiguration` -| Name | Type | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------- | -| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | `string \| undefined` | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | -| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | `string \| undefined` | Optional URL of the OP's Dynamic Client Registration Endpoint | -| revocationEndpoint | `string \| undefined` | Optional URL of the OAuth server used for revoking tokens | -| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | +| Name | Type | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------- | +| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | +| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's Dynamic Client Registration Endpoint | +| revocationEndpoint | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OAuth server used for revoking tokens | +| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | ### `OAuthParameters` Learn more about OAuth Parameters on this exciting page: [openid-connect-core](https://openid.net/specs/openid-connect-core-1_0.html). To save time I've copied over some of the relevant information, which you can find below. -| Name | Type | -| ------------- | --------------------------------------- | -| nonce | `OAuthNonceParameter \| undefined` | -| display | `OAuthParametersDisplay \| undefined` | -| prompt | `OAuthPromptParameter \| undefined` | -| max_age | `OAuthMaxAgeParameter \| undefined` | -| ui_locales | `OAuthUILocalesParameter \| undefined` | -| id_token_hint | `OAuthIDTokenHintParameter \| undefined` | -| login_hint | `OAuthLoginHintParameter \| undefined` | -| acr_values | `OAuthACRValuesParameter \| undefined` | +| Name | Type | +| ------------- | --------------------------------------------------------------- | +| nonce | <InlineCode>OAuthNonceParameter \| undefined</InlineCode> | +| display | <InlineCode>OAuthParametersDisplay \| undefined</InlineCode> | +| prompt | <InlineCode>OAuthPromptParameter \| undefined</InlineCode> | +| max_age | <InlineCode>OAuthMaxAgeParameter \| undefined</InlineCode> | +| ui_locales | <InlineCode>OAuthUILocalesParameter \| undefined</InlineCode> | +| id_token_hint | <InlineCode>OAuthIDTokenHintParameter \| undefined</InlineCode> | +| login_hint | <InlineCode>OAuthLoginHintParameter \| undefined</InlineCode> | +| acr_values | <InlineCode>OAuthACRValuesParameter \| undefined</InlineCode> | Other parameters MAY be sent. See Sections [3.2.2](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthorizationEndpoint), [3.3.2](https://openid.net/specs/openid-connect-core-1_0.html#HybridAuthorizationEndpoint), [5.2](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts), [5.5](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter), [6](https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests), and [7.2.1](https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter) for additional Authorization Request parameters and parameter values defined by this specification. diff --git a/docs/pages/versions/unversioned/sdk/auth-session.md b/docs/pages/versions/unversioned/sdk/auth-session.md index b04cf8108495a..dbac00b9d35db 100644 --- a/docs/pages/versions/unversioned/sdk/auth-session.md +++ b/docs/pages/versions/unversioned/sdk/auth-session.md @@ -9,6 +9,7 @@ import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import { SocialGrid, SocialGridItem, CreateAppButton } from '~/components/plugins/AuthSessionElements'; import TerminalBlock from '~/components/plugins/TerminalBlock'; import SnackInline from '~/components/plugins/SnackInline'; +import { InlineCode } from '~/components/base/code'; `AuthSession` is the easiest way to add web browser based authentication (for example, browser-based OAuth flows) to your app, built on top of [WebBrowser](../webbrowser/), [Crypto](../crypto/), and [Random](../random/). If you would like to understand how it does this, read this document from top to bottom. If you just want to use it, jump to the [Authentication Guide](/guides/authentication). @@ -325,14 +326,14 @@ This error method will add the missing description for more context on what went Object returned after an auth request has completed. -| Name | Type | Description | Default | -| -------------- | ------------------------ | -------------------------------------------------------------------------- | ------- | -| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | -| url | `string` | Auth URL that was opened | | -| error | `AuthError \| null` | Possible error if the auth failed with type `error` | | -| params | `Record<string, string>` | Query params from the `url` as an object | | -| authentication | `TokenResponse \| null` | Returned when the auth finishes with an `access_token` property | | -| errorCode | `string \| null` | Legacy error code query param, use `error` instead | | +| Name | Type | Description | Default | +| -------------- | ---------------------------------------------- | -------------------------------------------------------------------------- | ------- | +| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | +| url | `string` | Auth URL that was opened | | +| error | <InlineCode>AuthError \| null</InlineCode> | Possible error if the auth failed with type `error` | | +| params | `Record<string, string>` | Query params from the `url` as an object | | +| authentication | <InlineCode>TokenResponse \| null</InlineCode> | Returned when the auth finishes with an `access_token` property | | +| errorCode | <InlineCode>string \| null</InlineCode> | Legacy error code query param, use `error` instead | | - If the user cancelled the auth session by closing the browser or popup, the result is `{ type: 'cancel' }`. - If the auth is dismissed manually with `AuthSession.dismiss()`, the result is `{ type: 'dismiss' }`. @@ -355,19 +356,19 @@ desired grant type by using the a response type: [Section 3.1.1][s311]. Represents an OAuth authorization request as JSON. -| Name | Type | Description | Default | Spec | -| ------------------- | ------------------------- | -------------------------------------------------------------- | ------- | ------------------------------- | -| responseType | `ResponseType \| string` | Specifies what is returned from the authorization server | `.Code` | [Section 3.1.1][s311] | -| clientId | `string` | Unique ID representing the info provided by the client | | [Section 2.2][s22] | -| redirectUri | `string` | The server will redirect to this URI when complete | | [Section 3.1.2][s312] | -| prompt | `Prompt` | Should the user be prompted to login or consent again. | | [Section 3.1.2.1][oidc-authreq] | -| scopes | `string[]` | List of strings to request access to | | [Section 3.3][s33] | -| clientSecret | `?string` | Client secret supplied by an auth provider | | [Section 2.3.1][s231] | -| codeChallengeMethod | `CodeChallengeMethod` | Method used to generate the code challenge | `.S256` | [Section 6.2][s62] | -| codeChallenge | `?string` | Derived from the code verifier using the `CodeChallengeMethod` | | [Section 4.2][s42] | -| state | `?string` | Used for protection against Cross-Site Request Forgery | | [Section 10.12][s1012] | -| usePKCE | `?boolean` | Should use Proof Key for Code Exchange | `true` | [PKCE][pkce] | -| extraParams | `?Record<string, string>` | Extra query params that'll be added to the query string | | `N/A` | +| Name | Type | Description | Default | Spec | +| ------------------- | ----------------------------------------------- | -------------------------------------------------------------- | ------- | ------------------------------- | +| responseType | <InlineCode>ResponseType \| string</InlineCode> | Specifies what is returned from the authorization server | `.Code` | [Section 3.1.1][s311] | +| clientId | `string` | Unique ID representing the info provided by the client | | [Section 2.2][s22] | +| redirectUri | `string` | The server will redirect to this URI when complete | | [Section 3.1.2][s312] | +| prompt | `Prompt` | Should the user be prompted to login or consent again. | | [Section 3.1.2.1][oidc-authreq] | +| scopes | `string[]` | List of strings to request access to | | [Section 3.3][s33] | +| clientSecret | `?string` | Client secret supplied by an auth provider | | [Section 2.3.1][s231] | +| codeChallengeMethod | `CodeChallengeMethod` | Method used to generate the code challenge | `.S256` | [Section 6.2][s62] | +| codeChallenge | `?string` | Derived from the code verifier using the `CodeChallengeMethod` | | [Section 4.2][s42] | +| state | `?string` | Used for protection against Cross-Site Request Forgery | | [Section 10.12][s1012] | +| usePKCE | `?boolean` | Should use Proof Key for Code Exchange | `true` | [PKCE][pkce] | +| extraParams | `?Record<string, string>` | Extra query params that'll be added to the query string | | `N/A` | ### `AuthRequestPromptOptions` diff --git a/docs/pages/versions/unversioned/sdk/barometer.md b/docs/pages/versions/unversioned/sdk/barometer.md index bd5b6ccb8ba7e..a7835e0023deb 100644 --- a/docs/pages/versions/unversioned/sdk/barometer.md +++ b/docs/pages/versions/unversioned/sdk/barometer.md @@ -7,6 +7,7 @@ import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; `Barometer` from **`expo-sensors`** provides access to the device barometer sensor to respond to changes in air pressure. `pressure` is measured in _`hectopascals`_ or _`hPa`_. @@ -143,10 +144,10 @@ type BarometerMeasurement = { }; ``` -| Name | Type | Format | iOS | Android | Web | -| ---------------- | -------------------- | -------- | --- | ------- | --- | -| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | -| relativeAltitude | `number \| undefined` | `meters` | ✅ | ❌ | ❌ | +| Name | Type | Format | iOS | Android | Web | +| ---------------- | -------------------------------------------- | -------- | --- | ------- | --- | +| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | +| relativeAltitude | <InlineCode>number \| undefined</InlineCode> | `meters` | ✅ | ❌ | ❌ | ## Units and Providers diff --git a/docs/pages/versions/unversioned/sdk/firebase-analytics.md b/docs/pages/versions/unversioned/sdk/firebase-analytics.md index a9acc2e00a642..60fe36a7a3d09 100644 --- a/docs/pages/versions/unversioned/sdk/firebase-analytics.md +++ b/docs/pages/versions/unversioned/sdk/firebase-analytics.md @@ -6,6 +6,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/master/packages/expo-firebase- import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; > **This is the only Firebase Analytics package for React Native that has universal platform support (iOS, Android, Web, and Electron).** @@ -200,9 +201,9 @@ Sets the user ID property. This feature must be used in accordance with [Google' #### Parameters -| Name | Type | Description | -| ------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| userId | `string \| null` | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | +| Name | Type | Description | +| ------ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| userId | <InlineCode>string \| null</InlineCode> | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | #### Example @@ -227,10 +228,10 @@ The following user property names are reserved and cannot be used: #### Parameters -| Name | Type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | -| value | `string \| null` | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | +| Name | Type | Description | +| ----- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | +| value | <InlineCode>string \| null</InlineCode> | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | #### Example @@ -306,7 +307,7 @@ Analytics.setUnavailabilityLogging(false); setDebugModeEnabled(isEnabled: boolean): Promise<void> ``` -Enables debug mode *(Expo client only)* so events can be tracked using the [DebugView in the Analytics dashboard](https://firebase.google.com/docs/analytics/debugview#reporting). +Enables debug mode _(Expo client only)_ so events can be tracked using the [DebugView in the Analytics dashboard](https://firebase.google.com/docs/analytics/debugview#reporting). This option is **only available on the standard Expo client**. When using a standalone build, the bare workflow or web, use the [natively available options](https://firebase.google.com/docs/analytics/debugview). diff --git a/docs/pages/versions/unversioned/sdk/google.md b/docs/pages/versions/unversioned/sdk/google.md index 471503d83ab70..b26dcbf65457e 100644 --- a/docs/pages/versions/unversioned/sdk/google.md +++ b/docs/pages/versions/unversioned/sdk/google.md @@ -4,6 +4,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/master/packages/expo-google-ap --- import PlatformsSection from '~/components/plugins/PlatformsSection'; +import { InlineCode } from '~/components/base/code'; **`expo-google-app-auth`** provides Google authentication integration for Expo apps using a secure system web browser with native [**`expo-app-auth`**][expo-app-auth]. This is better than a WebView because you can reuse credentials saved on the device. This module uses [PKCE](https://tools.ietf.org/html/rfc7636) for secure native authentication. You won't need to define a provider config because this package utilizes Open ID Connect [auto discovery](https://openid.net/specs/openid-connect-discovery-1_0.html). @@ -56,17 +57,17 @@ The difference between this method and native authentication are very sparce. Go **LogInConfig** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [iosClientId][g-creds] | `string \| undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string \| undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string \| undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string \| undefined` | The Android client id registered with Google for use in a standalone app. | -| [clientId][g-creds] | `string \| undefined` | If the platform-appropriate client ID is not provided, this will be used instead. | -| [language][g-language] | `string \| undefined` | ISO language code ex (`fr`, `en-US`), this will choose which language is used in the Google sign-in UI. Defaults to the best estimation based on the users browser. | -| [loginHint][g-loginhint] | `string \| undefined` | If the user's email address is known ahead of time, it can be supplied to be the default option. This maps to the [OAuth login_hint][auth-loginhint] prop. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | -| redirectUrl | `string \| undefined` | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| [clientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | If the platform-appropriate client ID is not provided, this will be used instead. | +| [language][g-language] | <InlineCode>string \| undefined</InlineCode> | ISO language code ex (`fr`, `en-US`), this will choose which language is used in the Google sign-in UI. Defaults to the best estimation based on the users browser. | +| [loginHint][g-loginhint] | <InlineCode>string \| undefined</InlineCode> | If the user's email address is known ahead of time, it can be supplied to be the default option. This maps to the [OAuth login_hint][auth-loginhint] prop. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | **Note on `redirectUrl`**: If you choose to provide your own `redirectUrl`, it should start with the value returned by [`AppAuth.OAuthRedirect`](../../sdk/app-auth/#appauthoauthredirect). This way, the method will function correctly and consistently whether you are testing in the Expo Client or as a standalone app. @@ -79,24 +80,24 @@ If you choose to provide your own `redirectUrl`, it should start with the value **LogInResult** -| Name | Type | Description | -| ------------ | ---------------------- | ------------------------------------------------------------ | -| type | `'cancel' \| 'success'` | Denotes the summary of the user event. | -| accessToken | `string \| undefined` | Used for accessing data from Google, invalidate to "log out" | -| idToken | `string \| null` | ID token | -| refreshToken | `string \| null` | Refresh the other tokens. | -| user | `GoogleUser` | An object with data regarding the authenticated user. | +| Name | Type | Description | +| ------------ | ---------------------------------------------- | ------------------------------------------------------------ | +| type | <InlineCode>'cancel' \| 'success'</InlineCode> | Denotes the summary of the user event. | +| accessToken | <InlineCode>string \| undefined</InlineCode> | Used for accessing data from Google, invalidate to "log out" | +| idToken | <InlineCode>string \| null</InlineCode> | ID token | +| refreshToken | <InlineCode>string \| null</InlineCode> | Refresh the other tokens. | +| user | `GoogleUser` | An object with data regarding the authenticated user. | **GoogleUser** -| Name | Type | Description | -| ---------- | -------------------- | -------------------------- | -| id | `string \| undefined` | ID for the user | -| name | `string \| undefined` | name for the user | -| givenName | `string \| undefined` | first name for the user | -| familyName | `string \| undefined` | last name for the user | -| photoUrl | `string \| undefined` | photo for the user | -| email | `string \| undefined` | email address for the user | +| Name | Type | Description | +| ---------- | -------------------------------------------- | -------------------------- | +| id | <InlineCode>string \| undefined</InlineCode> | ID for the user | +| name | <InlineCode>string \| undefined</InlineCode> | name for the user | +| givenName | <InlineCode>string \| undefined</InlineCode> | first name for the user | +| familyName | <InlineCode>string \| undefined</InlineCode> | last name for the user | +| photoUrl | <InlineCode>string \| undefined</InlineCode> | photo for the user | +| email | <InlineCode>string \| undefined</InlineCode> | email address for the user | **Example** @@ -132,14 +133,14 @@ Invalidates the provided `accessToken`, given the client ID used to sign-in is p **options** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------- | -| accessToken | `string` | Provided when the user authenticates with your Google application. | -| [iosClientId][g-creds] | `string \| undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string \| undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string \| undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string \| undefined` | The Android client id registered with Google for use in a standalone app. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- | +| accessToken | `string` | Provided when the user authenticates with your Google application. | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | **Example** diff --git a/docs/pages/versions/v35.0.0/sdk/app-auth.md b/docs/pages/versions/v35.0.0/sdk/app-auth.md index 4234fbd6b08a6..04732633ed1fa 100644 --- a/docs/pages/versions/v35.0.0/sdk/app-auth.md +++ b/docs/pages/versions/v35.0.0/sdk/app-auth.md @@ -1,17 +1,18 @@ --- title: AppAuth -sourceCodeUrl: "https://github.com/expo/expo/tree/sdk-35/packages/expo-app-auth" +sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-35/packages/expo-app-auth' --- import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; This module provides access to the native OAuth library AppAuth by [OpenID](https://github.com/openid). #### Platform Compatibility -| Android Device | Android Emulator | iOS Device | iOS Simulator | Web | -| ------ | ---------- | ------ | ------ | ------ | -| ✅ | ✅ | ✅ | ✅ | ❌ | +| Android Device | Android Emulator | iOS Device | iOS Simulator | Web | +| -------------- | ---------------- | ---------- | ------------- | --- | +| ✅ | ✅ | ✅ | ✅ | ❌ | ## Installation @@ -260,14 +261,14 @@ Return value of the following `AppAuth` methods: - `AppAuth.authAsync()` - `AppAuth.refreshAsync()` -| Name | Type | Description | -| ------------------------- | -------------------------- | ----------------------------------------------------------------------------------------- | -| accessToken | `string | null` | Access token generated by the auth server | -| accessTokenExpirationDate | `string | null` | Approximate expiration date and time of the access token | -| additionalParameters | `{ [string]: any } | null` | Additional parameters returned from the auth server | -| idToken | `string | null` | ID Token value associated with the authenticated session | -| tokenType | `string | null` | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | -| refreshToken | `string | undefined` | The most recent refresh token received from the auth server | +| Name | Type | Description | +| ------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------- | +| accessToken | <InlineCode>string \| null</InlineCode> | Access token generated by the auth server | +| accessTokenExpirationDate | <InlineCode>string \| null</InlineCode> | Approximate expiration date and time of the access token | +| additionalParameters | <InlineCode>\{ \[string\]: any \} \| null</InlineCode> | Additional parameters returned from the auth server | +| idToken | <InlineCode>string \| null</InlineCode> | ID Token value associated with the authenticated session | +| tokenType | <InlineCode>string \| null</InlineCode> | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | +| refreshToken | <InlineCode>string \| undefined</InlineCode> | The most recent refresh token received from the auth server | ### `OAuthBaseProps` @@ -281,16 +282,16 @@ Return value of the following `AppAuth` methods: extends `OAuthBaseProps`, is used to create OAuth flows. -| Name | Type | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------- | -| clientId | `string` | The client identifier | -| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | -| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | -| clientSecret | `string | undefined` | used to prove that identity of the client when exchaning an authorization code for an access token | -| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | `Array\<string\> | undefined` | a list of space-delimited, case-sensitive strings define the scope of the access requested | -| redirectUrl | `string | undefined` | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | -| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | -| canMakeInsecureRequests | `boolean | undefined` | **Android: Only** enables the use of HTTP requests | +| Name | Type | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| clientId | `string` | The client identifier | +| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | +| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | +| clientSecret | <InlineCode>string \| undefined</InlineCode> | used to prove that identity of the client when exchaning an authorization code for an access token | +| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | <InlineCode>Array<string\> \| undefined</InlineCode> | a list of space-delimited, case-sensitive strings define the scope of the access requested | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | +| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | +| canMakeInsecureRequests | <InlineCode>boolean \| undefined</InlineCode> | **Android: Only** enables the use of HTTP requests | ### `OAuthRevokeOptions` @@ -301,28 +302,28 @@ extends `OAuthBaseProps`, is used to create OAuth flows. ### `OAuthServiceConfiguration` -| Name | Type | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------- | -| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | `string | undefined` | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | -| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | `string | undefined` | Optional URL of the OP's Dynamic Client Registration Endpoint | -| revocationEndpoint | `string | undefined` | Optional URL of the OAuth server used for revoking tokens | -| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | +| Name | Type | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------- | +| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | +| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's Dynamic Client Registration Endpoint | +| revocationEndpoint | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OAuth server used for revoking tokens | +| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | ### `OAuthParameters` Learn more about OAuth Parameters on this exciting page: [openid-connect-core](https://openid.net/specs/openid-connect-core-1_0.html). To save time I've copied over some of the relevant information, which you can find below. -| Name | Type | -| ------------- | --------------------------------------- | -| nonce | `OAuthNonceParameter | undefined` | -| display | `OAuthParametersDisplay | undefined` | -| prompt | `OAuthPromptParameter | undefined` | -| max_age | `OAuthMaxAgeParameter | undefined` | -| ui_locales | `OAuthUILocalesParameter | undefined` | -| id_token_hint | `OAuthIDTokenHintParameter | undefined` | -| login_hint | `OAuthLoginHintParameter | undefined` | -| acr_values | `OAuthACRValuesParameter | undefined` | +| Name | Type | +| ------------- | --------------------------------------------------------------- | +| nonce | <InlineCode>OAuthNonceParameter \| undefined</InlineCode> | +| display | <InlineCode>OAuthParametersDisplay \| undefined</InlineCode> | +| prompt | <InlineCode>OAuthPromptParameter \| undefined</InlineCode> | +| max_age | <InlineCode>OAuthMaxAgeParameter \| undefined</InlineCode> | +| ui_locales | <InlineCode>OAuthUILocalesParameter \| undefined</InlineCode> | +| id_token_hint | <InlineCode>OAuthIDTokenHintParameter \| undefined</InlineCode> | +| login_hint | <InlineCode>OAuthLoginHintParameter \| undefined</InlineCode> | +| acr_values | <InlineCode>OAuthACRValuesParameter \| undefined</InlineCode> | Other parameters MAY be sent. See Sections [3.2.2](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthorizationEndpoint), [3.3.2](https://openid.net/specs/openid-connect-core-1_0.html#HybridAuthorizationEndpoint), [5.2](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts), [5.5](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter), [6](https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests), and [7.2.1](https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter) for additional Authorization Request parameters and parameter values defined by this specification. diff --git a/docs/pages/versions/v35.0.0/sdk/barometer.md b/docs/pages/versions/v35.0.0/sdk/barometer.md index 671cad21f6a31..f1f78f9fe370c 100644 --- a/docs/pages/versions/v35.0.0/sdk/barometer.md +++ b/docs/pages/versions/v35.0.0/sdk/barometer.md @@ -1,18 +1,19 @@ --- title: Barometer -sourceCodeUrl: "https://github.com/expo/expo/tree/sdk-35/packages/expo-sensors" +sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-35/packages/expo-sensors' --- import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; Access the device barometer sensor to respond to changes in air pressure. `pressure` is measured in _`hectopascals`_ or _`hPa`_. #### Platform Compatibility -| Android Device | Android Emulator | iOS Device | iOS Simulator | Web | -| ------ | ---------- | ------ | ------ | ------ | -| ✅ | ✅ | ✅ | ❌ | ✅ | +| Android Device | Android Emulator | iOS Device | iOS Simulator | Web | +| -------------- | ---------------- | ---------- | ------------- | --- | +| ✅ | ✅ | ✅ | ❌ | ✅ | ## Installation @@ -77,6 +78,7 @@ export default class BarometerSensor extends React.Component { } } ``` + </SnackInline> ## API @@ -143,10 +145,10 @@ type BarometerMeasurement = { }; ``` -| Name | Type | Format | iOS | Android | Web | -| ---------------- | -------------------- | -------- | --- | ------- | --- | -| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | -| relativeAltitude | `number | undefined` | `meters` | ✅ | ❌ | ❌ | +| Name | Type | Format | iOS | Android | Web | +| ---------------- | -------------------------------------------- | -------- | --- | ------- | --- | +| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | +| relativeAltitude | <InlineCode>number \| undefined</InlineCode> | `meters` | ✅ | ❌ | ❌ | ## Units and Providers @@ -154,4 +156,4 @@ type BarometerMeasurement = { | ------- | ------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | | iOS | _`hPa`_ | [`CMAltimeter`](https://developer.apple.com/documentation/coremotion/cmaltimeter) | Altitude events reflect the change in the current altitude, not the absolute altitude. | | Android | _`hPa`_ | [`Sensor.TYPE_PRESSURE`](https://developer.android.com/reference/android/hardware/Sensor#TYPE_PRESSURE) | Monitoring air pressure changes. | -| Web | `N/A` | `N/A` | This sensor is not available on the web and cannot be accessed. An `UnavailabilityError` will be thrown if you attempt to get data. | \ No newline at end of file +| Web | `N/A` | `N/A` | This sensor is not available on the web and cannot be accessed. An `UnavailabilityError` will be thrown if you attempt to get data. | diff --git a/docs/pages/versions/v35.0.0/sdk/google.md b/docs/pages/versions/v35.0.0/sdk/google.md index 2f404e0577351..b3dc11e995d70 100644 --- a/docs/pages/versions/v35.0.0/sdk/google.md +++ b/docs/pages/versions/v35.0.0/sdk/google.md @@ -3,13 +3,15 @@ title: Google sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-35/packages/expo-google-app-auth' --- +import { InlineCode } from '~/components/base/code'; + Provides Google authentication integration for Expo apps using a secure system web browser with native [**`expo-app-auth`**][expo-app-auth]. This is better than a WebView because you can reuse credentials saved on the device. #### Platform Compatibility -| Android Device | Android Emulator | iOS Device | iOS Simulator | Web | -| ------ | ---------- | ------ | ------ | ------ | -| ✅ | ✅ | ✅ | ✅ | ❌ | +| Android Device | Android Emulator | iOS Device | iOS Simulator | Web | +| -------------- | ---------------- | ---------- | ------------- | --- | +| ✅ | ✅ | ✅ | ✅ | ❌ | ### How it works @@ -62,16 +64,16 @@ The difference between this method and native authentication are very sparce. Go **LogInConfig** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| [clientId][g-creds] | `string | undefined` | If the platform-appropriate client ID is not provided, this will be used instead. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | -| redirectUrl | `string | undefined` | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | -| behavior | `'system' | 'web'` | **DEPRECATED** use `expo-google-sign-in` for system authentication. | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| [clientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | If the platform-appropriate client ID is not provided, this will be used instead. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | +| behavior | <InlineCode>'system' \| 'web'</InlineCode> | **DEPRECATED** use `expo-google-sign-in` for system authentication. | **Note on `redirectUrl`**: If you choose to provide your own `redirectUrl`, it should start with the value returned by [`AppAuth.OAuthRedirect`](../../sdk/app-auth/#appauthoauthredirect). This way, the method will function correctly and consistently whether you are testing in the Expo Client or as a standalone app. @@ -84,24 +86,24 @@ If you choose to provide your own `redirectUrl`, it should start with the value **LogInResult** -| Name | Type | Description | -| ------------ | ---------------------- | ------------------------------------------------------------ | -| type | `'cancel' | 'success'` | Denotes the summary of the user event. | -| accessToken | `string | undefined` | Used for accessing data from Google, invalidate to "log out" | -| idToken | `string | null` | ID token | -| refreshToken | `string | null` | Refresh the other tokens. | -| user | `GoogleUser` | An object with data regarding the authenticated user. | +| Name | Type | Description | +| ------------ | ---------------------------------------------- | ------------------------------------------------------------ | +| type | <InlineCode>'cancel' \| 'success'</InlineCode> | Denotes the summary of the user event. | +| accessToken | <InlineCode>string \| undefined</InlineCode> | Used for accessing data from Google, invalidate to "log out" | +| idToken | <InlineCode>string \| null</InlineCode> | ID token | +| refreshToken | <InlineCode>string \| null</InlineCode> | Refresh the other tokens. | +| user | `GoogleUser` | An object with data regarding the authenticated user. | **GoogleUser** -| Name | Type | Description | -| ---------- | -------------------- | -------------------------- | -| id | `string | undefined` | ID for the user | -| name | `string | undefined` | name for the user | -| givenName | `string | undefined` | first name for the user | -| familyName | `string | undefined` | last name for the user | -| photoUrl | `string | undefined` | photo for the user | -| email | `string | undefined` | email address for the user | +| Name | Type | Description | +| ---------- | -------------------------------------------- | -------------------------- | +| id | <InlineCode>string \| undefined</InlineCode> | ID for the user | +| name | <InlineCode>string \| undefined</InlineCode> | name for the user | +| givenName | <InlineCode>string \| undefined</InlineCode> | first name for the user | +| familyName | <InlineCode>string \| undefined</InlineCode> | last name for the user | +| photoUrl | <InlineCode>string \| undefined</InlineCode> | photo for the user | +| email | <InlineCode>string \| undefined</InlineCode> | email address for the user | **Example** @@ -137,14 +139,14 @@ Invalidates the provided `accessToken`, given the client ID used to sign-in is p **options** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------- | -| accessToken | `string` | Provided when the user authenticates with your Google application. | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- | +| accessToken | `string` | Provided when the user authenticates with your Google application. | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | **Example** diff --git a/docs/pages/versions/v36.0.0/sdk/app-auth.md b/docs/pages/versions/v36.0.0/sdk/app-auth.md index d92c45b72df40..d006e081428c4 100644 --- a/docs/pages/versions/v36.0.0/sdk/app-auth.md +++ b/docs/pages/versions/v36.0.0/sdk/app-auth.md @@ -8,6 +8,7 @@ import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import { H3 } from '~/components/plugins/Headings'; +import { InlineCode } from '~/components/base/code'; **`expo-app-auth`** allows you to authenticate and authorize your users through the native OAuth library AppAuth by [OpenID](https://github.com/openid). @@ -317,14 +318,14 @@ Return value of the following `AppAuth` methods: - `AppAuth.authAsync()` - `AppAuth.refreshAsync()` -| Name | Type | Description | -| ------------------------- | -------------------------- | ----------------------------------------------------------------------------------------- | -| accessToken | `string | null` | Access token generated by the auth server | -| accessTokenExpirationDate | `string | null` | Approximate expiration date and time of the access token | -| additionalParameters | `{ [string]: any } | null` | Additional parameters returned from the auth server | -| idToken | `string | null` | ID Token value associated with the authenticated session | -| tokenType | `string | null` | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | -| refreshToken | `string | undefined` | The most recent refresh token received from the auth server | +| Name | Type | Description | +| ------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------- | +| accessToken | <InlineCode>string \| null</InlineCode> | Access token generated by the auth server | +| accessTokenExpirationDate | <InlineCode>string \| null</InlineCode> | Approximate expiration date and time of the access token | +| additionalParameters | <InlineCode>\{ \[string\]: any \} \| null</InlineCode> | Additional parameters returned from the auth server | +| idToken | <InlineCode>string \| null</InlineCode> | ID Token value associated with the authenticated session | +| tokenType | <InlineCode>string \| null</InlineCode> | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | +| refreshToken | <InlineCode>string \| undefined</InlineCode> | The most recent refresh token received from the auth server | ### `OAuthBaseProps` @@ -338,16 +339,16 @@ Return value of the following `AppAuth` methods: extends `OAuthBaseProps`, is used to create OAuth flows. -| Name | Type | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------- | -| clientId | `string` | The client identifier | -| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | -| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | -| clientSecret | `string | undefined` | used to prove that identity of the client when exchaning an authorization code for an access token | -| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | `Array\<string\> | undefined` | a list of space-delimited, case-sensitive strings define the scope of the access requested | -| redirectUrl | `string | undefined` | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | -| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | -| canMakeInsecureRequests | `boolean | undefined` | **Android: Only** enables the use of HTTP requests | +| Name | Type | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| clientId | `string` | The client identifier | +| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | +| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | +| clientSecret | <InlineCode>string \| undefined</InlineCode> | used to prove that identity of the client when exchaning an authorization code for an access token | +| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | <InlineCode>Array<string\> \| undefined</InlineCode> | a list of space-delimited, case-sensitive strings define the scope of the access requested | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | +| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | +| canMakeInsecureRequests | <InlineCode>boolean \| undefined</InlineCode> | **Android: Only** enables the use of HTTP requests | ### `OAuthRevokeOptions` @@ -358,28 +359,28 @@ extends `OAuthBaseProps`, is used to create OAuth flows. ### `OAuthServiceConfiguration` -| Name | Type | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------- | -| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | `string | undefined` | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | -| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | `string | undefined` | Optional URL of the OP's Dynamic Client Registration Endpoint | -| revocationEndpoint | `string | undefined` | Optional URL of the OAuth server used for revoking tokens | -| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | +| Name | Type | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------- | +| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | +| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's Dynamic Client Registration Endpoint | +| revocationEndpoint | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OAuth server used for revoking tokens | +| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | ### `OAuthParameters` Learn more about OAuth Parameters on this exciting page: [openid-connect-core](https://openid.net/specs/openid-connect-core-1_0.html). To save time I've copied over some of the relevant information, which you can find below. -| Name | Type | -| ------------- | --------------------------------------- | -| nonce | `OAuthNonceParameter | undefined` | -| display | `OAuthParametersDisplay | undefined` | -| prompt | `OAuthPromptParameter | undefined` | -| max_age | `OAuthMaxAgeParameter | undefined` | -| ui_locales | `OAuthUILocalesParameter | undefined` | -| id_token_hint | `OAuthIDTokenHintParameter | undefined` | -| login_hint | `OAuthLoginHintParameter | undefined` | -| acr_values | `OAuthACRValuesParameter | undefined` | +| Name | Type | +| ------------- | --------------------------------------------------------------- | +| nonce | <InlineCode>OAuthNonceParameter \| undefined</InlineCode> | +| display | <InlineCode>OAuthParametersDisplay \| undefined</InlineCode> | +| prompt | <InlineCode>OAuthPromptParameter \| undefined</InlineCode> | +| max_age | <InlineCode>OAuthMaxAgeParameter \| undefined</InlineCode> | +| ui_locales | <InlineCode>OAuthUILocalesParameter \| undefined</InlineCode> | +| id_token_hint | <InlineCode>OAuthIDTokenHintParameter \| undefined</InlineCode> | +| login_hint | <InlineCode>OAuthLoginHintParameter \| undefined</InlineCode> | +| acr_values | <InlineCode>OAuthACRValuesParameter \| undefined</InlineCode> | Other parameters MAY be sent. See Sections [3.2.2](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthorizationEndpoint), [3.3.2](https://openid.net/specs/openid-connect-core-1_0.html#HybridAuthorizationEndpoint), [5.2](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts), [5.5](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter), [6](https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests), and [7.2.1](https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter) for additional Authorization Request parameters and parameter values defined by this specification. diff --git a/docs/pages/versions/v36.0.0/sdk/barometer.md b/docs/pages/versions/v36.0.0/sdk/barometer.md index c060f118df2c1..dcfbdef05b261 100644 --- a/docs/pages/versions/v36.0.0/sdk/barometer.md +++ b/docs/pages/versions/v36.0.0/sdk/barometer.md @@ -7,6 +7,7 @@ import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; `Barometer` from **`expo-sensors`** provides access to the device barometer sensor to respond to changes in air pressure. `pressure` is measured in _`hectopascals`_ or _`hPa`_. @@ -139,10 +140,10 @@ type BarometerMeasurement = { }; ``` -| Name | Type | Format | iOS | Android | Web | -| ---------------- | -------------------- | -------- | --- | ------- | --- | -| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | -| relativeAltitude | `number | undefined` | `meters` | ✅ | ❌ | ❌ | +| Name | Type | Format | iOS | Android | Web | +| ---------------- | -------------------------------------------- | -------- | --- | ------- | --- | +| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | +| relativeAltitude | <InlineCode>number \| undefined</InlineCode> | `meters` | ✅ | ❌ | ❌ | ## Units and Providers diff --git a/docs/pages/versions/v36.0.0/sdk/google.md b/docs/pages/versions/v36.0.0/sdk/google.md index 51918034504fe..710e3e6bcd23f 100644 --- a/docs/pages/versions/v36.0.0/sdk/google.md +++ b/docs/pages/versions/v36.0.0/sdk/google.md @@ -4,6 +4,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-36/packages/expo-google-ap --- import PlatformsSection from '~/components/plugins/PlatformsSection'; +import { InlineCode } from '~/components/base/code'; **`expo-google-app-auth`** provides Google authentication integration for Expo apps using a secure system web browser with native [**`expo-app-auth`**][expo-app-auth]. This is better than a WebView because you can reuse credentials saved on the device. @@ -60,16 +61,16 @@ The difference between this method and native authentication are very sparce. Go **LogInConfig** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| [clientId][g-creds] | `string | undefined` | If the platform-appropriate client ID is not provided, this will be used instead. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | -| redirectUrl | `string | undefined` | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | -| behavior | `'system' | 'web'` | **DEPRECATED** use `expo-google-sign-in` for system authentication. | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| [clientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | If the platform-appropriate client ID is not provided, this will be used instead. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | +| behavior | <InlineCode>'system' \| 'web'</InlineCode> | **DEPRECATED** use `expo-google-sign-in` for system authentication. | **Note on `redirectUrl`**: If you choose to provide your own `redirectUrl`, it should start with the value returned by [`AppAuth.OAuthRedirect`](../../sdk/app-auth/#appauthoauthredirect). This way, the method will function correctly and consistently whether you are testing in the Expo Client or as a standalone app. @@ -82,24 +83,24 @@ If you choose to provide your own `redirectUrl`, it should start with the value **LogInResult** -| Name | Type | Description | -| ------------ | ---------------------- | ------------------------------------------------------------ | -| type | `'cancel' | 'success'` | Denotes the summary of the user event. | -| accessToken | `string | undefined` | Used for accessing data from Google, invalidate to "log out" | -| idToken | `string | null` | ID token | -| refreshToken | `string | null` | Refresh the other tokens. | -| user | `GoogleUser` | An object with data regarding the authenticated user. | +| Name | Type | Description | +| ------------ | ---------------------------------------------- | ------------------------------------------------------------ | +| type | <InlineCode>'cancel' \| 'success'</InlineCode> | Denotes the summary of the user event. | +| accessToken | <InlineCode>string \| undefined</InlineCode> | Used for accessing data from Google, invalidate to "log out" | +| idToken | <InlineCode>string \| null</InlineCode> | ID token | +| refreshToken | <InlineCode>string \| null</InlineCode> | Refresh the other tokens. | +| user | `GoogleUser` | An object with data regarding the authenticated user. | **GoogleUser** -| Name | Type | Description | -| ---------- | -------------------- | -------------------------- | -| id | `string | undefined` | ID for the user | -| name | `string | undefined` | name for the user | -| givenName | `string | undefined` | first name for the user | -| familyName | `string | undefined` | last name for the user | -| photoUrl | `string | undefined` | photo for the user | -| email | `string | undefined` | email address for the user | +| Name | Type | Description | +| ---------- | -------------------------------------------- | -------------------------- | +| id | <InlineCode>string \| undefined</InlineCode> | ID for the user | +| name | <InlineCode>string \| undefined</InlineCode> | name for the user | +| givenName | <InlineCode>string \| undefined</InlineCode> | first name for the user | +| familyName | <InlineCode>string \| undefined</InlineCode> | last name for the user | +| photoUrl | <InlineCode>string \| undefined</InlineCode> | photo for the user | +| email | <InlineCode>string \| undefined</InlineCode> | email address for the user | **Example** @@ -135,14 +136,14 @@ Invalidates the provided `accessToken`, given the client ID used to sign-in is p **options** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------- | -| accessToken | `string` | Provided when the user authenticates with your Google application. | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- | +| accessToken | `string` | Provided when the user authenticates with your Google application. | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | **Example** diff --git a/docs/pages/versions/v37.0.0/sdk/app-auth.md b/docs/pages/versions/v37.0.0/sdk/app-auth.md index f863ecab2f449..7741f023ecb97 100644 --- a/docs/pages/versions/v37.0.0/sdk/app-auth.md +++ b/docs/pages/versions/v37.0.0/sdk/app-auth.md @@ -8,6 +8,7 @@ import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import { H3 } from '~/components/plugins/Headings'; +import { InlineCode } from '~/components/base/code'; > ⚠️ For web support and more authentication methods, use the new [**AuthSession**](../auth-session) API @@ -319,14 +320,14 @@ Return value of the following `AppAuth` methods: - `AppAuth.authAsync()` - `AppAuth.refreshAsync()` -| Name | Type | Description | -| ------------------------- | -------------------------- | ----------------------------------------------------------------------------------------- | -| accessToken | `string | null` | Access token generated by the auth server | -| accessTokenExpirationDate | `string | null` | Approximate expiration date and time of the access token | -| additionalParameters | `{ [string]: any } | null` | Additional parameters returned from the auth server | -| idToken | `string | null` | ID Token value associated with the authenticated session | -| tokenType | `string | null` | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | -| refreshToken | `string | undefined` | The most recent refresh token received from the auth server | +| Name | Type | Description | +| ------------------------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| accessToken | <InlineCode>string \| null</InlineCode> | Access token generated by the auth server | +| accessTokenExpirationDate | <InlineCode>string \| null</InlineCode> | Approximate expiration date and time of the access token | +| additionalParameters | <InlineCode>\{ \[string\]: any \} \| null</InlineCode> | Additional parameters returned from the auth server | +| idToken | <InlineCode>string \| null</InlineCode> | ID Token value associated with the authenticated session | +| tokenType | <InlineCode>string \| null</InlineCode> | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | +| refreshToken | <InlineCode>string \| undefined</InlineCode> | The most recent refresh token received from the auth server | ### `OAuthBaseProps` @@ -340,16 +341,16 @@ Return value of the following `AppAuth` methods: extends `OAuthBaseProps`, is used to create OAuth flows. -| Name | Type | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------- | -| clientId | `string` | The client identifier | -| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | -| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | -| clientSecret | `string | undefined` | used to prove that identity of the client when exchaning an authorization code for an access token | -| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | `Array\<string\> | undefined` | a list of space-delimited, case-sensitive strings define the scope of the access requested | -| redirectUrl | `string | undefined` | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | -| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | -| canMakeInsecureRequests | `boolean | undefined` | **Android: Only** enables the use of HTTP requests | +| Name | Type | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| clientId | `string` | The client identifier | +| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | +| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | +| clientSecret | <InlineCode>string \| undefined</InlineCode> | used to prove that identity of the client when exchaning an authorization code for an access token | +| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | <InlineCode>Array<string\> \| undefined</InlineCode> | a list of space-delimited, case-sensitive strings define the scope of the access requested | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | +| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | +| canMakeInsecureRequests | <InlineCode>boolean \| undefined</InlineCode> | **Android: Only** enables the use of HTTP requests | ### `OAuthRevokeOptions` @@ -360,28 +361,28 @@ extends `OAuthBaseProps`, is used to create OAuth flows. ### `OAuthServiceConfiguration` -| Name | Type | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------- | -| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | `string | undefined` | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | -| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | `string | undefined` | Optional URL of the OP's Dynamic Client Registration Endpoint | -| revocationEndpoint | `string | undefined` | Optional URL of the OAuth server used for revoking tokens | -| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | +| Name | Type | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------- | +| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | +| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's Dynamic Client Registration Endpoint | +| revocationEndpoint | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OAuth server used for revoking tokens | +| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | ### `OAuthParameters` Learn more about OAuth Parameters on this exciting page: [openid-connect-core](https://openid.net/specs/openid-connect-core-1_0.html). To save time I've copied over some of the relevant information, which you can find below. -| Name | Type | -| ------------- | --------------------------------------- | -| nonce | `OAuthNonceParameter | undefined` | -| display | `OAuthParametersDisplay | undefined` | -| prompt | `OAuthPromptParameter | undefined` | -| max_age | `OAuthMaxAgeParameter | undefined` | -| ui_locales | `OAuthUILocalesParameter | undefined` | -| id_token_hint | `OAuthIDTokenHintParameter | undefined` | -| login_hint | `OAuthLoginHintParameter | undefined` | -| acr_values | `OAuthACRValuesParameter | undefined` | +| Name | Type | +| ------------- | --------------------------------------------------------------- | +| nonce | <InlineCode>OAuthNonceParameter \| undefined</InlineCode> | +| display | <InlineCode>OAuthParametersDisplay \| undefined</InlineCode> | +| prompt | <InlineCode>OAuthPromptParameter \| undefined</InlineCode> | +| max_age | <InlineCode>OAuthMaxAgeParameter \| undefined</InlineCode> | +| ui_locales | <InlineCode>OAuthUILocalesParameter \| undefined</InlineCode> | +| id_token_hint | <InlineCode>OAuthIDTokenHintParameter \| undefined</InlineCode> | +| login_hint | <InlineCode>OAuthLoginHintParameter \| undefined</InlineCode> | +| acr_values | <InlineCode>OAuthACRValuesParameter \| undefined</InlineCode> | Other parameters MAY be sent. See Sections [3.2.2](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthorizationEndpoint), [3.3.2](https://openid.net/specs/openid-connect-core-1_0.html#HybridAuthorizationEndpoint), [5.2](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts), [5.5](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter), [6](https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests), and [7.2.1](https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter) for additional Authorization Request parameters and parameter values defined by this specification. diff --git a/docs/pages/versions/v37.0.0/sdk/auth-session.md b/docs/pages/versions/v37.0.0/sdk/auth-session.md index 8b5c3ebad9b05..1e0deb9eff9bd 100644 --- a/docs/pages/versions/v37.0.0/sdk/auth-session.md +++ b/docs/pages/versions/v37.0.0/sdk/auth-session.md @@ -9,6 +9,7 @@ import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import { SocialGrid, SocialGridItem, CreateAppButton } from '~/components/plugins/AuthSessionElements'; import TerminalBlock from '~/components/plugins/TerminalBlock'; import SnackInline from '~/components/plugins/SnackInline'; +import { InlineCode } from '~/components/base/code'; `AuthSession` is the easiest way to add web browser based authentication (for example, browser-based OAuth flows) to your app, built on top of [WebBrowser](../webbrowser/), [Crypto](../crypto/), and [Random](../random/). If you would like to understand how it does this, read this document from top to bottom. If you just want to use it, jump to the [Authentication Guide](/guides/authentication). @@ -283,13 +284,13 @@ This error method will add the missing description for more context on what went Object returned after an auth request has completed. -| Name | Type | Description | Default | -| --------- | ------------------------ | -------------------------------------------------------------------------- | ------- | -| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | -| url | `string` | Auth URL that was opened | | -| error | `AuthError | null` | Possible error if the auth failed with type `error` | | -| params | `Record<string, string>` | Query params from the `url` as an object | | -| errorCode | `string | null` | Legacy error code query param, use `error` instead | | +| Name | Type | Description | Default | +| --------- | ------------------------------------------ | -------------------------------------------------------------------------- | ------- | +| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | +| url | `string` | Auth URL that was opened | | +| error | <InlineCode>AuthError \| null</InlineCode> | Possible error if the auth failed with type `error` | | +| params | `Record<string, string>` | Query params from the `url` as an object | | +| errorCode | <InlineCode>string \| null</InlineCode> | Legacy error code query param, use `error` instead | | - If the user cancelled the auth session by closing the browser or popup, the result is `{ type: 'cancel' }`. - If the auth is dismissed manually with `AuthSession.dismiss()`, the result is `{ type: 'dismiss' }`. diff --git a/docs/pages/versions/v37.0.0/sdk/barometer.md b/docs/pages/versions/v37.0.0/sdk/barometer.md index 2b2b4ad799b55..af585ff7cc46b 100644 --- a/docs/pages/versions/v37.0.0/sdk/barometer.md +++ b/docs/pages/versions/v37.0.0/sdk/barometer.md @@ -7,6 +7,7 @@ import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; `Barometer` from **`expo-sensors`** provides access to the device barometer sensor to respond to changes in air pressure. `pressure` is measured in _`hectopascals`_ or _`hPa`_. @@ -143,10 +144,10 @@ type BarometerMeasurement = { }; ``` -| Name | Type | Format | iOS | Android | Web | -| ---------------- | -------------------- | -------- | --- | ------- | --- | -| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | -| relativeAltitude | `number | undefined` | `meters` | ✅ | ❌ | ❌ | +| Name | Type | Format | iOS | Android | Web | +| ---------------- | -------------------------------------------- | -------- | --- | ------- | --- | +| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | +| relativeAltitude | <InlineCode>number \| undefined</InlineCode> | `meters` | ✅ | ❌ | ❌ | ## Units and Providers diff --git a/docs/pages/versions/v37.0.0/sdk/firebase-analytics.md b/docs/pages/versions/v37.0.0/sdk/firebase-analytics.md index 584e22554f848..2e560feeb3ae2 100644 --- a/docs/pages/versions/v37.0.0/sdk/firebase-analytics.md +++ b/docs/pages/versions/v37.0.0/sdk/firebase-analytics.md @@ -6,6 +6,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-37/packages/expo-firebase- import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; > **This is the only Firebase Analytics package for React Native that has universal platform support (iOS, Android, Web, and Electron).** @@ -200,9 +201,9 @@ Sets the user ID property. This feature must be used in accordance with [Google' #### Parameters -| Name | Type | Description | -| ------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| userId | `string | null` | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | +| Name | Type | Description | +| ------ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| userId | <InlineCode>string \| null</InlineCode> | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | #### Example @@ -227,10 +228,10 @@ The following user property names are reserved and cannot be used: #### Parameters -| Name | Type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | -| value | `string | null` | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | +| Name | Type | Description | +| ----- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | +| value | <InlineCode>string \| null</InlineCode> | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | #### Example @@ -306,7 +307,7 @@ Analytics.setUnavailabilityLogging(false); setDebugModeEnabled(isEnabled: boolean): Promise<void> ``` -Enables debug mode *(Expo client only)* so events can be tracked using the [DebugView in the Analytics dashboard](https://firebase.google.com/docs/analytics/debugview#reporting). +Enables debug mode _(Expo client only)_ so events can be tracked using the [DebugView in the Analytics dashboard](https://firebase.google.com/docs/analytics/debugview#reporting). This option is **only available on the standard Expo client**. When using a standalone build, the bare workflow or web, use the [natively available options](https://firebase.google.com/docs/analytics/debugview). diff --git a/docs/pages/versions/v37.0.0/sdk/google.md b/docs/pages/versions/v37.0.0/sdk/google.md index 0873aa1072651..b0ce430a7aad4 100644 --- a/docs/pages/versions/v37.0.0/sdk/google.md +++ b/docs/pages/versions/v37.0.0/sdk/google.md @@ -4,6 +4,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-37/packages/expo-google-ap --- import PlatformsSection from '~/components/plugins/PlatformsSection'; +import { InlineCode } from '~/components/base/code'; **`expo-google-app-auth`** provides Google authentication integration for Expo apps using a secure system web browser with native [**`expo-app-auth`**][expo-app-auth]. This is better than a WebView because you can reuse credentials saved on the device. @@ -60,16 +61,16 @@ The difference between this method and native authentication are very sparce. Go **LogInConfig** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| [clientId][g-creds] | `string | undefined` | If the platform-appropriate client ID is not provided, this will be used instead. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | -| redirectUrl | `string | undefined` | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | -| behavior | `'system' | 'web'` | **DEPRECATED** use `expo-google-sign-in` for system authentication. | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| [clientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | If the platform-appropriate client ID is not provided, this will be used instead. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | +| behavior | <InlineCode>'system' \| 'web'</InlineCode> | **DEPRECATED** use `expo-google-sign-in` for system authentication. | **Note on `redirectUrl`**: If you choose to provide your own `redirectUrl`, it should start with the value returned by [`AppAuth.OAuthRedirect`](../../sdk/app-auth/#appauthoauthredirect). This way, the method will function correctly and consistently whether you are testing in the Expo Client or as a standalone app. @@ -82,24 +83,24 @@ If you choose to provide your own `redirectUrl`, it should start with the value **LogInResult** -| Name | Type | Description | -| ------------ | ---------------------- | ------------------------------------------------------------ | -| type | `'cancel' | 'success'` | Denotes the summary of the user event. | -| accessToken | `string | undefined` | Used for accessing data from Google, invalidate to "log out" | -| idToken | `string | null` | ID token | -| refreshToken | `string | null` | Refresh the other tokens. | -| user | `GoogleUser` | An object with data regarding the authenticated user. | +| Name | Type | Description | +| ------------ | ---------------------------------------------- | ------------------------------------------------------------ | +| type | <InlineCode>'cancel' \| 'success'</InlineCode> | Denotes the summary of the user event. | +| accessToken | <InlineCode>string \| undefined</InlineCode> | Used for accessing data from Google, invalidate to "log out" | +| idToken | <InlineCode>string \| null</InlineCode> | ID token | +| refreshToken | <InlineCode>string \| null</InlineCode> | Refresh the other tokens. | +| user | `GoogleUser` | An object with data regarding the authenticated user. | **GoogleUser** -| Name | Type | Description | -| ---------- | -------------------- | -------------------------- | -| id | `string | undefined` | ID for the user | -| name | `string | undefined` | name for the user | -| givenName | `string | undefined` | first name for the user | -| familyName | `string | undefined` | last name for the user | -| photoUrl | `string | undefined` | photo for the user | -| email | `string | undefined` | email address for the user | +| Name | Type | Description | +| ---------- | -------------------------------------------- | -------------------------- | +| id | <InlineCode>string \| undefined</InlineCode> | ID for the user | +| name | <InlineCode>string \| undefined</InlineCode> | name for the user | +| givenName | <InlineCode>string \| undefined</InlineCode> | first name for the user | +| familyName | <InlineCode>string \| undefined</InlineCode> | last name for the user | +| photoUrl | <InlineCode>string \| undefined</InlineCode> | photo for the user | +| email | <InlineCode>string \| undefined</InlineCode> | email address for the user | **Example** @@ -135,14 +136,14 @@ Invalidates the provided `accessToken`, given the client ID used to sign-in is p **options** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------- | -| accessToken | `string` | Provided when the user authenticates with your Google application. | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- | +| accessToken | `string` | Provided when the user authenticates with your Google application. | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | **Example** diff --git a/docs/pages/versions/v38.0.0/sdk/app-auth.md b/docs/pages/versions/v38.0.0/sdk/app-auth.md index d55a98f1f8b82..6516179804466 100644 --- a/docs/pages/versions/v38.0.0/sdk/app-auth.md +++ b/docs/pages/versions/v38.0.0/sdk/app-auth.md @@ -8,6 +8,7 @@ import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import { H3 } from '~/components/plugins/Headings'; +import { InlineCode } from '~/components/base/code'; > ⚠️ For web support and more authentication methods, use the new [**AuthSession**](../auth-session) API @@ -319,14 +320,14 @@ Return value of the following `AppAuth` methods: - `AppAuth.authAsync()` - `AppAuth.refreshAsync()` -| Name | Type | Description | -| ------------------------- | -------------------------- | ----------------------------------------------------------------------------------------- | -| accessToken | `string | null` | Access token generated by the auth server | -| accessTokenExpirationDate | `string | null` | Approximate expiration date and time of the access token | -| additionalParameters | `{ [string]: any } | null` | Additional parameters returned from the auth server | -| idToken | `string | null` | ID Token value associated with the authenticated session | -| tokenType | `string | null` | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | -| refreshToken | `string | undefined` | The most recent refresh token received from the auth server | +| Name | Type | Description | +| ------------------------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------- | +| accessToken | <InlineCode>string \| null</InlineCode> | Access token generated by the auth server | +| accessTokenExpirationDate | <InlineCode>string \| null</InlineCode> | Approximate expiration date and time of the access token | +| additionalParameters | <InlineCode>\{ \[string\]: any \} \| null</InlineCode> | Additional parameters returned from the auth server | +| idToken | <InlineCode>string \| null</InlineCode> | ID Token value associated with the authenticated session | +| tokenType | <InlineCode>string \| null</InlineCode> | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | +| refreshToken | <InlineCode>string \| undefined</InlineCode> | The most recent refresh token received from the auth server | ### `OAuthBaseProps` @@ -340,16 +341,16 @@ Return value of the following `AppAuth` methods: extends `OAuthBaseProps`, is used to create OAuth flows. -| Name | Type | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------- | -| clientId | `string` | The client identifier | -| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | -| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | -| clientSecret | `string | undefined` | used to prove that identity of the client when exchaning an authorization code for an access token | -| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | `Array\<string\> | undefined` | a list of space-delimited, case-sensitive strings define the scope of the access requested | -| redirectUrl | `string | undefined` | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | -| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | -| canMakeInsecureRequests | `boolean | undefined` | **Android: Only** enables the use of HTTP requests | +| Name | Type | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| clientId | `string` | The client identifier | +| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | +| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | +| clientSecret | <InlineCode>string \| undefined</InlineCode> | used to prove that identity of the client when exchaning an authorization code for an access token | +| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | <InlineCode>Array<string\> \| undefined</InlineCode> | a list of space-delimited, case-sensitive strings define the scope of the access requested | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | +| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | +| canMakeInsecureRequests | <InlineCode>boolean \| undefined</InlineCode> | **Android: Only** enables the use of HTTP requests | ### `OAuthRevokeOptions` @@ -360,28 +361,28 @@ extends `OAuthBaseProps`, is used to create OAuth flows. ### `OAuthServiceConfiguration` -| Name | Type | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------- | -| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | `string | undefined` | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | -| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | `string | undefined` | Optional URL of the OP's Dynamic Client Registration Endpoint | -| revocationEndpoint | `string | undefined` | Optional URL of the OAuth server used for revoking tokens | -| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | +| Name | Type | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------- | +| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | +| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's Dynamic Client Registration Endpoint | +| revocationEndpoint | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OAuth server used for revoking tokens | +| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | ### `OAuthParameters` Learn more about OAuth Parameters on this exciting page: [openid-connect-core](https://openid.net/specs/openid-connect-core-1_0.html). To save time I've copied over some of the relevant information, which you can find below. -| Name | Type | -| ------------- | --------------------------------------- | -| nonce | `OAuthNonceParameter | undefined` | -| display | `OAuthParametersDisplay | undefined` | -| prompt | `OAuthPromptParameter | undefined` | -| max_age | `OAuthMaxAgeParameter | undefined` | -| ui_locales | `OAuthUILocalesParameter | undefined` | -| id_token_hint | `OAuthIDTokenHintParameter | undefined` | -| login_hint | `OAuthLoginHintParameter | undefined` | -| acr_values | `OAuthACRValuesParameter | undefined` | +| Name | Type | +| ------------- | --------------------------------------------------------------- | +| nonce | <InlineCode>OAuthNonceParameter \| undefined</InlineCode> | +| display | <InlineCode>OAuthParametersDisplay \| undefined</InlineCode> | +| prompt | <InlineCode>OAuthPromptParameter \| undefined</InlineCode> | +| max_age | <InlineCode>OAuthMaxAgeParameter \| undefined</InlineCode> | +| ui_locales | <InlineCode>OAuthUILocalesParameter \| undefined</InlineCode> | +| id_token_hint | <InlineCode>OAuthIDTokenHintParameter \| undefined</InlineCode> | +| login_hint | <InlineCode>OAuthLoginHintParameter \| undefined</InlineCode> | +| acr_values | <InlineCode>OAuthACRValuesParameter \| undefined</InlineCode> | Other parameters MAY be sent. See Sections [3.2.2](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthorizationEndpoint), [3.3.2](https://openid.net/specs/openid-connect-core-1_0.html#HybridAuthorizationEndpoint), [5.2](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts), [5.5](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter), [6](https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests), and [7.2.1](https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter) for additional Authorization Request parameters and parameter values defined by this specification. diff --git a/docs/pages/versions/v38.0.0/sdk/auth-session.md b/docs/pages/versions/v38.0.0/sdk/auth-session.md index 1565061b30101..ede555d9c426a 100644 --- a/docs/pages/versions/v38.0.0/sdk/auth-session.md +++ b/docs/pages/versions/v38.0.0/sdk/auth-session.md @@ -9,6 +9,7 @@ import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import { SocialGrid, SocialGridItem, CreateAppButton } from '~/components/plugins/AuthSessionElements'; import TerminalBlock from '~/components/plugins/TerminalBlock'; import SnackInline from '~/components/plugins/SnackInline'; +import { InlineCode } from '~/components/base/code'; `AuthSession` is the easiest way to add web browser based authentication (for example, browser-based OAuth flows) to your app, built on top of [WebBrowser](../webbrowser/), [Crypto](../crypto/), and [Random](../random/). If you would like to understand how it does this, read this document from top to bottom. If you just want to use it, jump to the [Authentication Guide](/guides/authentication). @@ -283,13 +284,13 @@ This error method will add the missing description for more context on what went Object returned after an auth request has completed. -| Name | Type | Description | Default | -| --------- | ------------------------ | -------------------------------------------------------------------------- | ------- | -| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | -| url | `string` | Auth URL that was opened | | -| error | `AuthError | null` | Possible error if the auth failed with type `error` | | -| params | `Record<string, string>` | Query params from the `url` as an object | | -| errorCode | `string | null` | Legacy error code query param, use `error` instead | | +| Name | Type | Description | Default | +| --------- | ------------------------------------------ | -------------------------------------------------------------------------- | ------- | +| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | +| url | `string` | Auth URL that was opened | | +| error | <InlineCode>AuthError \| null</InlineCode> | Possible error if the auth failed with type `error` | | +| params | `Record<string, string>` | Query params from the `url` as an object | | +| errorCode | <InlineCode>string \| null</InlineCode> | Legacy error code query param, use `error` instead | | - If the user cancelled the auth session by closing the browser or popup, the result is `{ type: 'cancel' }`. - If the auth is dismissed manually with `AuthSession.dismiss()`, the result is `{ type: 'dismiss' }`. diff --git a/docs/pages/versions/v38.0.0/sdk/barometer.md b/docs/pages/versions/v38.0.0/sdk/barometer.md index 3c8ffc6fe6b7b..06b944fd30141 100644 --- a/docs/pages/versions/v38.0.0/sdk/barometer.md +++ b/docs/pages/versions/v38.0.0/sdk/barometer.md @@ -7,6 +7,7 @@ import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; `Barometer` from **`expo-sensors`** provides access to the device barometer sensor to respond to changes in air pressure. `pressure` is measured in _`hectopascals`_ or _`hPa`_. @@ -143,10 +144,10 @@ type BarometerMeasurement = { }; ``` -| Name | Type | Format | iOS | Android | Web | -| ---------------- | -------------------- | -------- | --- | ------- | --- | -| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | -| relativeAltitude | `number | undefined` | `meters` | ✅ | ❌ | ❌ | +| Name | Type | Format | iOS | Android | Web | +| ---------------- | -------------------------------------------- | -------- | --- | ------- | --- | +| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | +| relativeAltitude | <InlineCode>number \| undefined</InlineCode> | `meters` | ✅ | ❌ | ❌ | ## Units and Providers diff --git a/docs/pages/versions/v38.0.0/sdk/firebase-analytics.md b/docs/pages/versions/v38.0.0/sdk/firebase-analytics.md index 8e9020501d2cc..c24eefa3cc399 100644 --- a/docs/pages/versions/v38.0.0/sdk/firebase-analytics.md +++ b/docs/pages/versions/v38.0.0/sdk/firebase-analytics.md @@ -6,6 +6,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-38/packages/expo-firebase- import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; > **This is the only Firebase Analytics package for React Native that has universal platform support (iOS, Android, Web, and Electron).** @@ -200,9 +201,9 @@ Sets the user ID property. This feature must be used in accordance with [Google' #### Parameters -| Name | Type | Description | -| ------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| userId | `string | null` | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | +| Name | Type | Description | +| ------ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| userId | <InlineCode>string \| null</InlineCode> | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | #### Example @@ -227,10 +228,10 @@ The following user property names are reserved and cannot be used: #### Parameters -| Name | Type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | -| value | `string | null` | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | +| Name | Type | Description | +| ----- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | +| value | <InlineCode>string \| null</InlineCode> | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | #### Example @@ -306,7 +307,7 @@ Analytics.setUnavailabilityLogging(false); setDebugModeEnabled(isEnabled: boolean): Promise<void> ``` -Enables debug mode *(Expo client only)* so events can be tracked using the [DebugView in the Analytics dashboard](https://firebase.google.com/docs/analytics/debugview#reporting). +Enables debug mode _(Expo client only)_ so events can be tracked using the [DebugView in the Analytics dashboard](https://firebase.google.com/docs/analytics/debugview#reporting). This option is **only available on the standard Expo client**. When using a standalone build, the bare workflow or web, use the [natively available options](https://firebase.google.com/docs/analytics/debugview). diff --git a/docs/pages/versions/v38.0.0/sdk/google.md b/docs/pages/versions/v38.0.0/sdk/google.md index 3e0a9c3f7cbb0..a409718f917f7 100644 --- a/docs/pages/versions/v38.0.0/sdk/google.md +++ b/docs/pages/versions/v38.0.0/sdk/google.md @@ -4,6 +4,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-38/packages/expo-google-ap --- import PlatformsSection from '~/components/plugins/PlatformsSection'; +import { InlineCode } from '~/components/base/code'; **`expo-google-app-auth`** provides Google authentication integration for Expo apps using a secure system web browser with native [**`expo-app-auth`**][expo-app-auth]. This is better than a WebView because you can reuse credentials saved on the device. This module uses [PKCE](https://tools.ietf.org/html/rfc7636) for secure native authentication. You won't need to define a provider config because this package utilizes Open ID Connect [auto discovery](https://openid.net/specs/openid-connect-discovery-1_0.html). @@ -56,17 +57,17 @@ The difference between this method and native authentication are very sparce. Go **LogInConfig** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| [clientId][g-creds] | `string | undefined` | If the platform-appropriate client ID is not provided, this will be used instead. | -| [language][g-language] | `string | undefined` | ISO language code ex (`fr`, `en-US`), this will choose which language is used in the Google sign-in UI. Defaults to the best estimation based on the users browser. | -| [loginHint][g-loginhint] | `string | undefined` | If the user's email address is known ahead of time, it can be supplied to be the default option. This maps to the [OAuth login_hint][auth-loginhint] prop. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | -| redirectUrl | `string | undefined` | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| [clientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | If the platform-appropriate client ID is not provided, this will be used instead. | +| [language][g-language] | <InlineCode>string \| undefined</InlineCode> | ISO language code ex (`fr`, `en-US`), this will choose which language is used in the Google sign-in UI. Defaults to the best estimation based on the users browser. | +| [loginHint][g-loginhint] | <InlineCode>string \| undefined</InlineCode> | If the user's email address is known ahead of time, it can be supplied to be the default option. This maps to the [OAuth login_hint][auth-loginhint] prop. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | **Note on `redirectUrl`**: If you choose to provide your own `redirectUrl`, it should start with the value returned by [`AppAuth.OAuthRedirect`](../../sdk/app-auth/#appauthoauthredirect). This way, the method will function correctly and consistently whether you are testing in the Expo Client or as a standalone app. @@ -79,24 +80,24 @@ If you choose to provide your own `redirectUrl`, it should start with the value **LogInResult** -| Name | Type | Description | -| ------------ | ---------------------- | ------------------------------------------------------------ | -| type | `'cancel' | 'success'` | Denotes the summary of the user event. | -| accessToken | `string | undefined` | Used for accessing data from Google, invalidate to "log out" | -| idToken | `string | null` | ID token | -| refreshToken | `string | null` | Refresh the other tokens. | -| user | `GoogleUser` | An object with data regarding the authenticated user. | +| Name | Type | Description | +| ------------ | ---------------------------------------------- | ------------------------------------------------------------ | +| type | <InlineCode>'cancel' \| 'success'</InlineCode> | Denotes the summary of the user event. | +| accessToken | <InlineCode>string \| undefined</InlineCode> | Used for accessing data from Google, invalidate to "log out" | +| idToken | <InlineCode>string \| null</InlineCode> | ID token | +| refreshToken | <InlineCode>string \| null</InlineCode> | Refresh the other tokens. | +| user | `GoogleUser` | An object with data regarding the authenticated user. | **GoogleUser** -| Name | Type | Description | -| ---------- | -------------------- | -------------------------- | -| id | `string | undefined` | ID for the user | -| name | `string | undefined` | name for the user | -| givenName | `string | undefined` | first name for the user | -| familyName | `string | undefined` | last name for the user | -| photoUrl | `string | undefined` | photo for the user | -| email | `string | undefined` | email address for the user | +| Name | Type | Description | +| ---------- | -------------------------------------------- | -------------------------- | +| id | <InlineCode>string \| undefined</InlineCode> | ID for the user | +| name | <InlineCode>string \| undefined</InlineCode> | name for the user | +| givenName | <InlineCode>string \| undefined</InlineCode> | first name for the user | +| familyName | <InlineCode>string \| undefined</InlineCode> | last name for the user | +| photoUrl | <InlineCode>string \| undefined</InlineCode> | photo for the user | +| email | <InlineCode>string \| undefined</InlineCode> | email address for the user | **Example** @@ -132,14 +133,14 @@ Invalidates the provided `accessToken`, given the client ID used to sign-in is p **options** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------- | -| accessToken | `string` | Provided when the user authenticates with your Google application. | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- | +| accessToken | `string` | Provided when the user authenticates with your Google application. | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | **Example** diff --git a/docs/pages/versions/v39.0.0/sdk/app-auth.md b/docs/pages/versions/v39.0.0/sdk/app-auth.md index e395bd1e9825c..25f6bcafa84f2 100644 --- a/docs/pages/versions/v39.0.0/sdk/app-auth.md +++ b/docs/pages/versions/v39.0.0/sdk/app-auth.md @@ -8,6 +8,7 @@ import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import { H3 } from '~/components/plugins/Headings'; +import { InlineCode } from '~/components/base/code'; > ⚠️ For web support and more authentication methods, use the new [**AuthSession**](../auth-session) API @@ -319,14 +320,14 @@ Return value of the following `AppAuth` methods: - `AppAuth.authAsync()` - `AppAuth.refreshAsync()` -| Name | Type | Description | -| ------------------------- | -------------------------- | ----------------------------------------------------------------------------------------- | -| accessToken | `string | null` | Access token generated by the auth server | -| accessTokenExpirationDate | `string | null` | Approximate expiration date and time of the access token | -| additionalParameters | `{ [string]: any } | null` | Additional parameters returned from the auth server | -| idToken | `string | null` | ID Token value associated with the authenticated session | -| tokenType | `string | null` | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | -| refreshToken | `string | undefined` | The most recent refresh token received from the auth server | +| Name | Type | Description | +| ------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| accessToken | <InlineCode>string \| null</InlineCode> | Access token generated by the auth server | +| accessTokenExpirationDate | <InlineCode>string \| null</InlineCode> | Approximate expiration date and time of the access token | +| additionalParameters | <InlineCode>\{ \[string\]: any \} \| null</InlineCode> | Additional parameters returned from the auth server | +| idToken | <InlineCode>string \| null</InlineCode> | ID Token value associated with the authenticated session | +| tokenType | <InlineCode>string \| null</InlineCode> | Typically "Bearer" when defined or a value the client has negotiated with the auth Server | +| refreshToken | <InlineCode>string \| undefined</InlineCode> | The most recent refresh token received from the auth server | ### `OAuthBaseProps` @@ -340,16 +341,16 @@ Return value of the following `AppAuth` methods: extends `OAuthBaseProps`, is used to create OAuth flows. -| Name | Type | Description | -| ---------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | ----------------------------------------------------------------------------------------------------------- | -| clientId | `string` | The client identifier | -| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | -| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | -| clientSecret | `string | undefined` | used to prove that identity of the client when exchaning an authorization code for an access token | -| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | `Array\<string\> | undefined` | a list of space-delimited, case-sensitive strings define the scope of the access requested | -| redirectUrl | `string | undefined` | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | -| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | -| canMakeInsecureRequests | `boolean | undefined` | **Android: Only** enables the use of HTTP requests | +| Name | Type | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| clientId | `string` | The client identifier | +| [issuer](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#a7bd40452bb3a0094f251934fd85a8fd6) | `string` | URL using the https scheme with no query or fragment component that the OP asserts as its Issuer Identifier | +| serviceConfiguration | `OAuthServiceConfiguration` | specifies how to connect to a particular OAuth provider | +| clientSecret | <InlineCode>string \| undefined</InlineCode> | used to prove that identity of the client when exchaning an authorization code for an access token | +| [scopes](https://tools.ietf.org/html/rfc6749#section-3.3) | <InlineCode>Array<string\> \| undefined</InlineCode> | a list of space-delimited, case-sensitive strings define the scope of the access requested | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | The client's redirect URI. Default: `AppAuth.OAuthRedirect + ':/oauthredirect'` | +| [additionalParameters](https://tools.ietf.org/html/rfc6749#section-3.1) | `OAuthParameters` | Extra props passed to the OAuth server request | +| canMakeInsecureRequests | <InlineCode>boolean \| undefined</InlineCode> | **Android: Only** enables the use of HTTP requests | ### `OAuthRevokeOptions` @@ -360,28 +361,28 @@ extends `OAuthBaseProps`, is used to create OAuth flows. ### `OAuthServiceConfiguration` -| Name | Type | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------- | -| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | `string | undefined` | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | -| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | `string | undefined` | Optional URL of the OP's Dynamic Client Registration Endpoint | -| revocationEndpoint | `string | undefined` | Optional URL of the OAuth server used for revoking tokens | -| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | +| Name | Type | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------- | +| [authorizationEndpoint](https://openid.net/specs/openid-connect-core-1_0.html#AuthorizationEndpoint) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's OAuth 2.0 Authorization Endpoint | +| [registrationEndpoint](http://openid.github.io/AppAuth-iOS/docs/latest/interface_o_i_d_service_discovery.html#ab6a4608552978d3bce67b93b45321555) | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OP's Dynamic Client Registration Endpoint | +| revocationEndpoint | <InlineCode>string \| undefined</InlineCode> | Optional URL of the OAuth server used for revoking tokens | +| tokenEndpoint | `string` | URL of the OP's OAuth 2.0 Token Endpoint | ### `OAuthParameters` Learn more about OAuth Parameters on this exciting page: [openid-connect-core](https://openid.net/specs/openid-connect-core-1_0.html). To save time I've copied over some of the relevant information, which you can find below. -| Name | Type | -| ------------- | --------------------------------------- | -| nonce | `OAuthNonceParameter | undefined` | -| display | `OAuthParametersDisplay | undefined` | -| prompt | `OAuthPromptParameter | undefined` | -| max_age | `OAuthMaxAgeParameter | undefined` | -| ui_locales | `OAuthUILocalesParameter | undefined` | -| id_token_hint | `OAuthIDTokenHintParameter | undefined` | -| login_hint | `OAuthLoginHintParameter | undefined` | -| acr_values | `OAuthACRValuesParameter | undefined` | +| Name | Type | +| ------------- | --------------------------------------------------------------- | +| nonce | <InlineCode>OAuthNonceParameter \| undefined</InlineCode> | +| display | <InlineCode>OAuthParametersDisplay \| undefined</InlineCode> | +| prompt | <InlineCode>OAuthPromptParameter \| undefined</InlineCode> | +| max_age | <InlineCode>OAuthMaxAgeParameter \| undefined</InlineCode> | +| ui_locales | <InlineCode>OAuthUILocalesParameter \| undefined</InlineCode> | +| id_token_hint | <InlineCode>OAuthIDTokenHintParameter \| undefined</InlineCode> | +| login_hint | <InlineCode>OAuthLoginHintParameter \| undefined</InlineCode> | +| acr_values | <InlineCode>OAuthACRValuesParameter \| undefined</InlineCode> | Other parameters MAY be sent. See Sections [3.2.2](https://openid.net/specs/openid-connect-core-1_0.html#ImplicitAuthorizationEndpoint), [3.3.2](https://openid.net/specs/openid-connect-core-1_0.html#HybridAuthorizationEndpoint), [5.2](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsLanguagesAndScripts), [5.5](https://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter), [6](https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests), and [7.2.1](https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter) for additional Authorization Request parameters and parameter values defined by this specification. diff --git a/docs/pages/versions/v39.0.0/sdk/auth-session.md b/docs/pages/versions/v39.0.0/sdk/auth-session.md index d42520701e32e..29eee76799360 100644 --- a/docs/pages/versions/v39.0.0/sdk/auth-session.md +++ b/docs/pages/versions/v39.0.0/sdk/auth-session.md @@ -9,6 +9,7 @@ import TableOfContentSection from '~/components/plugins/TableOfContentSection'; import { SocialGrid, SocialGridItem, CreateAppButton } from '~/components/plugins/AuthSessionElements'; import TerminalBlock from '~/components/plugins/TerminalBlock'; import SnackInline from '~/components/plugins/SnackInline'; +import { InlineCode } from '~/components/base/code'; `AuthSession` is the easiest way to add web browser based authentication (for example, browser-based OAuth flows) to your app, built on top of [WebBrowser](../webbrowser/), [Crypto](../crypto/), and [Random](../random/). If you would like to understand how it does this, read this document from top to bottom. If you just want to use it, jump to the [Authentication Guide](/guides/authentication). @@ -325,13 +326,13 @@ This error method will add the missing description for more context on what went Object returned after an auth request has completed. -| Name | Type | Description | Default | -| --------- | ------------------------ | -------------------------------------------------------------------------- | ------- | -| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | -| url | `string` | Auth URL that was opened | | -| error | `AuthError | null` | Possible error if the auth failed with type `error` | | -| params | `Record<string, string>` | Query params from the `url` as an object | | -| errorCode | `string | null` | Legacy error code query param, use `error` instead | | +| Name | Type | Description | Default | +| --------- | ------------------------------------------ | -------------------------------------------------------------------------- | ------- | +| type | `string` | How the auth completed `'cancel', 'dismiss', 'locked', 'error', 'success'` | `.Code` | +| url | `string` | Auth URL that was opened | | +| error | <InlineCode>AuthError \| null</InlineCode> | Possible error if the auth failed with type `error` | | +| params | `Record<string, string>` | Query params from the `url` as an object | | +| errorCode | <InlineCode>string \| null</InlineCode> | Legacy error code query param, use `error` instead | | - If the user cancelled the auth session by closing the browser or popup, the result is `{ type: 'cancel' }`. - If the auth is dismissed manually with `AuthSession.dismiss()`, the result is `{ type: 'dismiss' }`. @@ -354,19 +355,19 @@ desired grant type by using the a response type: [Section 3.1.1][s311]. Represents an OAuth authorization request as JSON. -| Name | Type | Description | Default | Spec | -| ------------------- | ------------------------- | -------------------------------------------------------------- | ------- | ------------------------------- | -| responseType | `ResponseType | string` | Specifies what is returned from the authorization server | `.Code` | [Section 3.1.1][s311] | -| clientId | `string` | Unique ID representing the info provided by the client | | [Section 2.2][s22] | -| redirectUri | `string` | The server will redirect to this URI when complete | | [Section 3.1.2][s312] | -| prompt | `Prompt` | Should the user be prompted to login or consent again. | | [Section 3.1.2.1][oidc-authreq] | -| scopes | `string[]` | List of strings to request access to | | [Section 3.3][s33] | -| clientSecret | `?string` | Client secret supplied by an auth provider | | [Section 2.3.1][s231] | -| codeChallengeMethod | `CodeChallengeMethod` | Method used to generate the code challenge | `.S256` | [Section 6.2][s62] | -| codeChallenge | `?string` | Derived from the code verifier using the `CodeChallengeMethod` | | [Section 4.2][s42] | -| state | `?string` | Used for protection against Cross-Site Request Forgery | | [Section 10.12][s1012] | -| usePKCE | `?boolean` | Should use Proof Key for Code Exchange | `true` | [PKCE][pkce] | -| extraParams | `?Record<string, string>` | Extra query params that'll be added to the query string | | `N/A` | +| Name | Type | Description | Default | Spec | +| ------------------- | ----------------------------------------------- | -------------------------------------------------------------- | ------- | ------------------------------- | +| responseType | <InlineCode>ResponseType \| string</InlineCode> | Specifies what is returned from the authorization server | `.Code` | [Section 3.1.1][s311] | +| clientId | `string` | Unique ID representing the info provided by the client | | [Section 2.2][s22] | +| redirectUri | `string` | The server will redirect to this URI when complete | | [Section 3.1.2][s312] | +| prompt | `Prompt` | Should the user be prompted to login or consent again. | | [Section 3.1.2.1][oidc-authreq] | +| scopes | `string[]` | List of strings to request access to | | [Section 3.3][s33] | +| clientSecret | `?string` | Client secret supplied by an auth provider | | [Section 2.3.1][s231] | +| codeChallengeMethod | `CodeChallengeMethod` | Method used to generate the code challenge | `.S256` | [Section 6.2][s62] | +| codeChallenge | `?string` | Derived from the code verifier using the `CodeChallengeMethod` | | [Section 4.2][s42] | +| state | `?string` | Used for protection against Cross-Site Request Forgery | | [Section 10.12][s1012] | +| usePKCE | `?boolean` | Should use Proof Key for Code Exchange | `true` | [PKCE][pkce] | +| extraParams | `?Record<string, string>` | Extra query params that'll be added to the query string | | `N/A` | ### `AuthRequestPromptOptions` diff --git a/docs/pages/versions/v39.0.0/sdk/barometer.md b/docs/pages/versions/v39.0.0/sdk/barometer.md index 0476916543f57..a13ef66bc3655 100644 --- a/docs/pages/versions/v39.0.0/sdk/barometer.md +++ b/docs/pages/versions/v39.0.0/sdk/barometer.md @@ -7,6 +7,7 @@ import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import SnackInline from '~/components/plugins/SnackInline'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; `Barometer` from **`expo-sensors`** provides access to the device barometer sensor to respond to changes in air pressure. `pressure` is measured in _`hectopascals`_ or _`hPa`_. @@ -143,10 +144,10 @@ type BarometerMeasurement = { }; ``` -| Name | Type | Format | iOS | Android | Web | -| ---------------- | -------------------- | -------- | --- | ------- | --- | -| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | -| relativeAltitude | `number | undefined` | `meters` | ✅ | ❌ | ❌ | +| Name | Type | Format | iOS | Android | Web | +| ---------------- | -------------------------------------------- | -------- | --- | ------- | --- | +| pressure | `number` | `hPa` | ✅ | ✅ | ❌ | +| relativeAltitude | <InlineCode>number \| undefined</InlineCode> | `meters` | ✅ | ❌ | ❌ | ## Units and Providers diff --git a/docs/pages/versions/v39.0.0/sdk/firebase-analytics.md b/docs/pages/versions/v39.0.0/sdk/firebase-analytics.md index 0c55fdf5cbc11..debd073fe4890 100644 --- a/docs/pages/versions/v39.0.0/sdk/firebase-analytics.md +++ b/docs/pages/versions/v39.0.0/sdk/firebase-analytics.md @@ -6,6 +6,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-39/packages/expo-firebase- import InstallSection from '~/components/plugins/InstallSection'; import PlatformsSection from '~/components/plugins/PlatformsSection'; import TableOfContentSection from '~/components/plugins/TableOfContentSection'; +import { InlineCode } from '~/components/base/code'; > **This is the only Firebase Analytics package for React Native that has universal platform support (iOS, Android, Web, and Electron).** @@ -200,9 +201,9 @@ Sets the user ID property. This feature must be used in accordance with [Google' #### Parameters -| Name | Type | Description | -| ------ | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| userId | `string | null` | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | +| Name | Type | Description | +| ------ | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| userId | <InlineCode>string \| null</InlineCode> | The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID. | #### Example @@ -227,10 +228,10 @@ The following user property names are reserved and cannot be used: #### Parameters -| Name | Type | Description | -| ----- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | -| value | `string | null` | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | +| Name | Type | Description | +| ----- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| name | `string` | The name of the user property to set. Should contain 1 to 24 alphanumeric characters or underscores and must start with an alphabetic character. The `firebase_`, `google_`, and `ga_` prefixes are reserved and should not be used for user property names. | +| value | <InlineCode>string \| null</InlineCode> | The value of the user property. Values can be up to 36 characters long. Setting the value to null removes the user property. | #### Example diff --git a/docs/pages/versions/v39.0.0/sdk/google.md b/docs/pages/versions/v39.0.0/sdk/google.md index b876371447f62..be9ed0cd3439e 100644 --- a/docs/pages/versions/v39.0.0/sdk/google.md +++ b/docs/pages/versions/v39.0.0/sdk/google.md @@ -4,6 +4,7 @@ sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-39/packages/expo-google-ap --- import PlatformsSection from '~/components/plugins/PlatformsSection'; +import { InlineCode } from '~/components/base/code'; **`expo-google-app-auth`** provides Google authentication integration for Expo apps using a secure system web browser with native [**`expo-app-auth`**][expo-app-auth]. This is better than a WebView because you can reuse credentials saved on the device. This module uses [PKCE](https://tools.ietf.org/html/rfc7636) for secure native authentication. You won't need to define a provider config because this package utilizes Open ID Connect [auto discovery](https://openid.net/specs/openid-connect-discovery-1_0.html). @@ -56,17 +57,17 @@ The difference between this method and native authentication are very sparce. Go **LogInConfig** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| [clientId][g-creds] | `string | undefined` | If the platform-appropriate client ID is not provided, this will be used instead. | -| [language][g-language] | `string | undefined` | ISO language code ex (`fr`, `en-US`), this will choose which language is used in the Google sign-in UI. Defaults to the best estimation based on the users browser. | -| [loginHint][g-loginhint] | `string | undefined` | If the user's email address is known ahead of time, it can be supplied to be the default option. This maps to the [OAuth login_hint][auth-loginhint] prop. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | -| redirectUrl | `string | undefined` | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| [clientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | If the platform-appropriate client ID is not provided, this will be used instead. | +| [language][g-language] | <InlineCode>string \| undefined</InlineCode> | ISO language code ex (`fr`, `en-US`), this will choose which language is used in the Google sign-in UI. Defaults to the best estimation based on the users browser. | +| [loginHint][g-loginhint] | <InlineCode>string \| undefined</InlineCode> | If the user's email address is known ahead of time, it can be supplied to be the default option. This maps to the [OAuth login_hint][auth-loginhint] prop. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| redirectUrl | <InlineCode>string \| undefined</InlineCode> | Defaults to `${AppAuth.OAuthRedirect}:/oauth2redirect/google`. Optionally you can define your own redirect URL, just make sure to see the note below. | **Note on `redirectUrl`**: If you choose to provide your own `redirectUrl`, it should start with the value returned by [`AppAuth.OAuthRedirect`](../../sdk/app-auth/#appauthoauthredirect). This way, the method will function correctly and consistently whether you are testing in the Expo Client or as a standalone app. @@ -79,24 +80,24 @@ If you choose to provide your own `redirectUrl`, it should start with the value **LogInResult** -| Name | Type | Description | -| ------------ | ---------------------- | ------------------------------------------------------------ | -| type | `'cancel' | 'success'` | Denotes the summary of the user event. | -| accessToken | `string | undefined` | Used for accessing data from Google, invalidate to "log out" | -| idToken | `string | null` | ID token | -| refreshToken | `string | null` | Refresh the other tokens. | -| user | `GoogleUser` | An object with data regarding the authenticated user. | +| Name | Type | Description | +| ------------ | ---------------------------------------------- | ------------------------------------------------------------ | +| type | <InlineCode>'cancel' \| 'success'</InlineCode> | Denotes the summary of the user event. | +| accessToken | <InlineCode>string \| undefined</InlineCode> | Used for accessing data from Google, invalidate to "log out" | +| idToken | <InlineCode>string \| null</InlineCode> | ID token | +| refreshToken | <InlineCode>string \| null</InlineCode> | Refresh the other tokens. | +| user | `GoogleUser` | An object with data regarding the authenticated user. | **GoogleUser** -| Name | Type | Description | -| ---------- | -------------------- | -------------------------- | -| id | `string | undefined` | ID for the user | -| name | `string | undefined` | name for the user | -| givenName | `string | undefined` | first name for the user | -| familyName | `string | undefined` | last name for the user | -| photoUrl | `string | undefined` | photo for the user | -| email | `string | undefined` | email address for the user | +| Name | Type | Description | +| ---------- | -------------------------------------------- | -------------------------- | +| id | <InlineCode>string \| undefined</InlineCode> | ID for the user | +| name | <InlineCode>string \| undefined</InlineCode> | name for the user | +| givenName | <InlineCode>string \| undefined</InlineCode> | first name for the user | +| familyName | <InlineCode>string \| undefined</InlineCode> | last name for the user | +| photoUrl | <InlineCode>string \| undefined</InlineCode> | photo for the user | +| email | <InlineCode>string \| undefined</InlineCode> | email address for the user | **Example** @@ -132,14 +133,14 @@ Invalidates the provided `accessToken`, given the client ID used to sign-in is p **options** -| Name | Type | Description | -| --------------------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------- | -| accessToken | `string` | Provided when the user authenticates with your Google application. | -| [iosClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in the Expo client app. | -| [androidClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in the Expo client app. | -| [iosStandaloneAppClientId][g-creds] | `string | undefined` | The iOS client id registered with Google for use in a standalone app. | -| [androidStandaloneAppClientId][g-creds] | `string | undefined` | The Android client id registered with Google for use in a standalone app. | -| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | +| Name | Type | Description | +| --------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- | +| accessToken | `string` | Provided when the user authenticates with your Google application. | +| [iosClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in the Expo client app. | +| [androidClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in the Expo client app. | +| [iosStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The iOS client id registered with Google for use in a standalone app. | +| [androidStandaloneAppClientId][g-creds] | <InlineCode>string \| undefined</InlineCode> | The Android client id registered with Google for use in a standalone app. | +| scopes | `string[] = ['profile', 'email']` | The scopes to ask for from Google for this login ([more information here][g-using-apis]) | **Example**