Skip to content

Commit

Permalink
Add 403 warning to pages with the SPA documentation (#2886)
Browse files Browse the repository at this point in the history
* Revised wording

* sprinkling in the 403 error help text message
  • Loading branch information
mooreds authored Feb 9, 2024
1 parent ad08efe commit bc484c3
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 6 deletions.
11 changes: 6 additions & 5 deletions astro/src/content/docs/_shared/_hosted-backend-warning.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 6 additions & 0 deletions astro/src/content/docs/sdks/angular-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-angular-sdk/main/README.md"
tags="forDocSite" />


## Usage With FusionAuth Cloud

<HostedBackendWarning />

## Source Code

The source code is available here: https://github.com/FusionAuth/fusionauth-angular-sdk/
6 changes: 5 additions & 1 deletion astro/src/content/docs/sdks/react-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-react-sdk/main/README.md"
tags="forDocSite" />

## Usage With FusionAuth Cloud

<HostedBackendWarning />

## Source Code

The source code is available here: https://github.com/FusionAuth/fusionauth-react-sdk/

5 changes: 5 additions & 0 deletions astro/src/content/docs/sdks/vue-sdk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

<RemoteContent url="https://raw.githubusercontent.com/FusionAuth/fusionauth-vue-sdk/main/README.md"
tags="forDocSite" />

## Usage With FusionAuth Cloud

<HostedBackendWarning />

## Source Code

The source code is available here: https://github.com/FusionAuth/fusionauth-vue-sdk/
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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.

<Aside type="caution">
While this example uses localhost for your application and FusionAuth, there are complications if you plan to deploy using FusionAuth Cloud.

<HostedBackendWarning />
</Aside>

First, install the FusionAuth Angular SDK:

```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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.

<Aside type="caution">
While this example uses localhost for your application and FusionAuth, there are complications if you plan to deploy using FusionAuth Cloud.

<HostedBackendWarning />
</Aside>

Install the FusionAuth React SDK, and React Router, which we'll use to manage the routes in our application:

```shell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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.

<Aside type="caution">
While this example uses localhost for your application and FusionAuth, there are complications if you plan to deploy using FusionAuth Cloud.

<HostedBackendWarning />
</Aside>

First, install the FusionAuth Vue SDK:

```shell
Expand Down

0 comments on commit bc484c3

Please sign in to comment.