From bc484c3e9813c7bb737726cce7e4be74d6a77238 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Fri, 9 Feb 2024 12:27:50 -0700 Subject: [PATCH] Add 403 warning to pages with the SPA documentation (#2886) * Revised wording * sprinkling in the 403 error help text message --- .../content/docs/_shared/_hosted-backend-warning.md | 11 ++++++----- astro/src/content/docs/sdks/angular-sdk.mdx | 6 ++++++ astro/src/content/docs/sdks/react-sdk.mdx | 6 +++++- astro/src/content/docs/sdks/vue-sdk.mdx | 5 +++++ .../quickstarts/quickstart-javascript-angular-web.mdx | 7 +++++++ .../quickstarts/quickstart-javascript-react-web.mdx | 7 +++++++ .../quickstarts/quickstart-javascript-vue-web.mdx | 7 +++++++ 7 files changed, 43 insertions(+), 6 deletions(-) diff --git a/astro/src/content/docs/_shared/_hosted-backend-warning.md b/astro/src/content/docs/_shared/_hosted-backend-warning.md index 11b612f0b1..9b986f788c 100644 --- a/astro/src/content/docs/_shared/_hosted-backend-warning.md +++ b/astro/src/content/docs/_shared/_hosted-backend-warning.md @@ -1,12 +1,13 @@ -When developing against a FusionAuth Cloud instance using an apex domain of `fusionauth.io` address, unless your application shares the same domain of `fusionauth.io` attempts to use these endpoints will fail with a `403` status code. +When developing against a FusionAuth Cloud instance with a hostname ending in `fusionauth.io`, unless your application shares the same domain of `fusionauth.io` attempts to use these endpoints will fail with a `403` status code. -These endpoints will not work correctly for cross origin requests. Cross origin requests occur when the application making the request to FusionAuth is using a separate domain. For example, if your application URL is `app.acme.com` and the FusionAuth URL is `acme.fusionauth.io` requests from your application to FusionAuth will be considered cross origin. +These endpoints do not work correctly for cross origin requests. Cross origin requests occur when the application making the request to FusionAuth is using a separate domain. For example, if your application URL is `app.acme.com` and the FusionAuth URL is `acme.fusionauth.io` requests from your application to FusionAuth will be considered cross origin. -If at all possible you should plan to access FusionAuth and your application in the same domain. If this is not possible, you may use one of these alternative methods: +If possible, have FusionAuth and your application served by the same domain, using a [proxy if needed](/docs/operate/deploy/proxy-setup). For example, serve your app from `app.acme.com` and FusionAuth from `auth.acme.com`. + +If this configuration is not possible, use one of these alternative methods: * Develop using a local FusionAuth instance, so both your webapp and FusionAuth are running on `localhost`. -* Use a proxy to rewrite the requests to utilize the same domain. * Do not use the the FusionAuth hosted backend, and instead write your own backend with a cross origin cookie policy: [here's an example](https://github.com/FusionAuth/fusionauth-example-react-sdk/tree/main/server). * Configure a [custom domain name for the FusionAuth Cloud instance](/docs/get-started/run-in-the-cloud/cloud#updating-with-existing-custom-domains) (limited to certain plans). -Modifying FusionAuth CORS configuration options will not fix this issue because the cookies that FusionAuth writes will not be accessible cross domain. +Modifying FusionAuth CORS configuration options does not fix this issue because the cookies that FusionAuth writes will not be accessible cross domain. diff --git a/astro/src/content/docs/sdks/angular-sdk.mdx b/astro/src/content/docs/sdks/angular-sdk.mdx index 84cd2fadef..0f394dae25 100644 --- a/astro/src/content/docs/sdks/angular-sdk.mdx +++ b/astro/src/content/docs/sdks/angular-sdk.mdx @@ -5,11 +5,17 @@ navcategory: developer section: sdks disableTOC: true --- +import HostedBackendWarning from 'src/content/docs/_shared/_hosted-backend-warning.md'; import RemoteContent from 'src/components/RemoteContent.astro'; + +## Usage With FusionAuth Cloud + + + ## Source Code The source code is available here: https://github.com/FusionAuth/fusionauth-angular-sdk/ diff --git a/astro/src/content/docs/sdks/react-sdk.mdx b/astro/src/content/docs/sdks/react-sdk.mdx index f0208740fa..d5d394f57a 100644 --- a/astro/src/content/docs/sdks/react-sdk.mdx +++ b/astro/src/content/docs/sdks/react-sdk.mdx @@ -5,12 +5,16 @@ navcategory: developer section: sdks disableTOC: true --- +import HostedBackendWarning from 'src/content/docs/_shared/_hosted-backend-warning.md'; import RemoteContent from 'src/components/RemoteContent.astro'; +## Usage With FusionAuth Cloud + + + ## Source Code The source code is available here: https://github.com/FusionAuth/fusionauth-react-sdk/ - diff --git a/astro/src/content/docs/sdks/vue-sdk.mdx b/astro/src/content/docs/sdks/vue-sdk.mdx index 9b8b26789f..53314a93da 100644 --- a/astro/src/content/docs/sdks/vue-sdk.mdx +++ b/astro/src/content/docs/sdks/vue-sdk.mdx @@ -5,11 +5,16 @@ navcategory: developer section: sdks disableTOC: true --- +import HostedBackendWarning from 'src/content/docs/_shared/_hosted-backend-warning.md'; import RemoteContent from 'src/components/RemoteContent.astro'; +## Usage With FusionAuth Cloud + + + ## Source Code The source code is available here: https://github.com/FusionAuth/fusionauth-vue-sdk/ diff --git a/astro/src/content/quickstarts/quickstart-javascript-angular-web.mdx b/astro/src/content/quickstarts/quickstart-javascript-angular-web.mdx index f8b5d106c2..5f55b5a441 100644 --- a/astro/src/content/quickstarts/quickstart-javascript-angular-web.mdx +++ b/astro/src/content/quickstarts/quickstart-javascript-angular-web.mdx @@ -14,6 +14,7 @@ cta: EmailListCTA --- import Aside from '/src/components/Aside.astro'; import DockerSpinup from '/src/components/quickstarts/DockerSpinup.astro'; +import HostedBackendWarning from 'src/content/docs/_shared/_hosted-backend-warning.md'; import Intro from '/src/components/quickstarts/Intro.astro'; import LoginArchitectureSdk from '/src/components/quickstarts/LoginArchitectureSdk.astro'; import NextSteps from '/src/components/quickstarts/NextSteps.astro'; @@ -63,6 +64,12 @@ You'll be prompted to answer a few questions about your application. You can cho We are going to use the [Hosted Backend](/docs/apis/hosted-backend) feature of FusionAuth, so you don't need to worry about setting up a backend server. + + First, install the FusionAuth Angular SDK: ```shell diff --git a/astro/src/content/quickstarts/quickstart-javascript-react-web.mdx b/astro/src/content/quickstarts/quickstart-javascript-react-web.mdx index 58f287653a..0fa41b7d9a 100644 --- a/astro/src/content/quickstarts/quickstart-javascript-react-web.mdx +++ b/astro/src/content/quickstarts/quickstart-javascript-react-web.mdx @@ -14,6 +14,7 @@ cta: EmailListCTA --- import Aside from '/src/components/Aside.astro'; import DockerSpinup from '/src/components/quickstarts/DockerSpinup.astro'; +import HostedBackendWarning from 'src/content/docs/_shared/_hosted-backend-warning.md'; import Intro from '/src/components/quickstarts/Intro.astro'; import LoginArchitectureSdk from '/src/components/quickstarts/LoginArchitectureSdk.astro'; import NextSteps from '/src/components/quickstarts/NextSteps.astro'; @@ -62,6 +63,12 @@ npx create-react-app changebank && cd changebank We are going to use the [Hosted Backend](/docs/apis/hosted-backend) feature of FusionAuth, so you don't need to worry about setting up a backend server. + + Install the FusionAuth React SDK, and React Router, which we'll use to manage the routes in our application: ```shell diff --git a/astro/src/content/quickstarts/quickstart-javascript-vue-web.mdx b/astro/src/content/quickstarts/quickstart-javascript-vue-web.mdx index acc0b7cf32..43e72a4bf2 100644 --- a/astro/src/content/quickstarts/quickstart-javascript-vue-web.mdx +++ b/astro/src/content/quickstarts/quickstart-javascript-vue-web.mdx @@ -14,6 +14,7 @@ cta: EmailListCTA --- import Aside from '/src/components/Aside.astro'; import DockerSpinup from '/src/components/quickstarts/DockerSpinup.astro'; +import HostedBackendWarning from 'src/content/docs/_shared/_hosted-backend-warning.md'; import Intro from '/src/components/quickstarts/Intro.astro'; import LoginArchitectureSdk from '/src/components/quickstarts/LoginArchitectureSdk.astro'; import NextSteps from '/src/components/quickstarts/NextSteps.astro'; @@ -59,6 +60,12 @@ npm create vue@latest -- changebank --typescript --router We are going to use the [Hosted Backend](/docs/apis/hosted-backend) feature of FusionAuth, so you don't need to worry about setting up a backend server. + + First, install the FusionAuth Vue SDK: ```shell