Skip to content

Commit

Permalink
public web service instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
rideam committed Mar 26, 2024
1 parent d37537b commit 02bf8c2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import {Code} from 'astro/components';
import Aside from '/src/components/Aside.astro';
import InlineField from 'src/components/InlineField.astro';

If your FusionAuth instance is hosted on a remote web server and you want to host the web service somewhere else, you have a few options for setting up a publicly available API endpoint for the Connector to call the web service from.

Check failure on line 5 in astro/src/content/docs/lifecycle/migrate-users/provider-specific/_make-webservice-public.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'fusionauth' instead of 'FusionAuth'. Raw Output: {"message": "[Vale.Terms] Use 'fusionauth' instead of 'FusionAuth'.", "location": {"path": "astro/src/content/docs/lifecycle/migrate-users/provider-specific/_make-webservice-public.mdx", "range": {"start": {"line": 5, "column": 9}}}, "severity": "ERROR"}

- Using Microsoft Azure, you can create an [HTTP trigger](https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-http-webhook-trigger?tabs=python-v2%2Cisolated-process%2Cnodejs-v4%2Cfunctionsv2) on an Azure function app.
- You can use an [API gateway](https://aws.amazon.com/api-gateway/) with a Lambda function on AWS.
- During testing you can create a self-hosted endpoint locally and make it accessible on the internet using a service like [ngrok](https://ngrok.com/).

<Aside type="note">
To use ngrok you can download it at https://ngrok.com. There are free and paid plans available. For testing a free plan suffice.

Follow this [quickstart to get ngrok up and running](https://ngrok.com/docs/getting-started/).
</Aside>

When ngrok is installed, you can start it with this command.

<Code lang="shell" code={`ngrok http ${props.ngrok_port}`}/>

Take note of the URL ngrok prints to your terminal. You can then use this URL as the <InlineField>Authentication URL</InlineField> value when setting up a Connector in FusionAuth. The URL should look something like `https://random-ngrok-string.ngrok-free.app`.

Check failure on line 21 in astro/src/content/docs/lifecycle/migrate-users/provider-specific/_make-webservice-public.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Terms] Use 'fusionauth' instead of 'FusionAuth'. Raw Output: {"message": "[Vale.Terms] Use 'fusionauth' instead of 'FusionAuth'.", "location": {"path": "astro/src/content/docs/lifecycle/migrate-users/provider-specific/_make-webservice-public.mdx", "range": {"start": {"line": 21, "column": 169}}}, "severity": "ERROR"}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import ScrollRef from 'src/components/ScrollRef.astro';
import SlowMigrationTimeline from 'src/content/docs/lifecycle/migrate-users/provider-specific/_slow-migration-timeline.mdx';
import WhatNext from 'src/content/docs/lifecycle/migrate-users/provider-specific/_what-next.mdx';
import AdditionalSupport from 'src/content/docs/lifecycle/migrate-users/provider-specific/_additional-support.mdx';
import MakeWebservicePublic from 'src/content/docs/lifecycle/migrate-users/provider-specific/_make-webservice-public.mdx';

export const migration_source_name = 'Frontegg';

Check failure on line 28 in astro/src/content/docs/lifecycle/migrate-users/provider-specific/frontegg.mdx

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Frontegg'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Frontegg'?", "location": {"path": "astro/src/content/docs/lifecycle/migrate-users/provider-specific/frontegg.mdx", "range": {"start": {"line": 28, "column": 39}}}, "severity": "ERROR"}
export const migration_source_dir = 'frontegg';
Expand Down Expand Up @@ -344,6 +345,8 @@ Enter the field values below.

<img src={`/img/docs/lifecycle/migrate-users/provider-specific/${migration_source_dir}/connector.png`} alt="Connector details in FusionAuth" width="1200" />

<MakeWebservicePublic ngrok_port='6252' />

<Aside type="caution">
In production, you will want to add some authentication to the web service.
</Aside>
Expand All @@ -367,6 +370,7 @@ After configuration, the Connector entry form should look similar to this:

Save the changes by clicking the save icon at the top right.


### Build An Authentication Intermediary Web Service

The next step is to write the small service available on port 6252 that forwards the user's login Id and password to {frontmatter.technology} and returns the user details that will be saved to FusionAuth if the login is successful.
Expand Down

0 comments on commit 02bf8c2

Please sign in to comment.