Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekwuno committed Oct 9, 2024
1 parent 36ae108 commit 802f8ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ This guide assumes the following:
## Steps

There are two ways to connect to a SurrealDB instance via Ngrok tunnel.

### Start SurrealDB Instance

Open your command line or terminal and run the following command to [start SurrealDB](/docs/surrealdb/introduction/start).
Expand All @@ -43,9 +45,10 @@ Open another command line or terminal window (do not close the SurrealDB one) an
ngrok http 8000
```

Note the forwarding address provided by Ngrok (e.g.**`25f6-2402-e280-2189-38e-9c15-d08-2f83-779e.ngrok-free.app`**).

Keep this address handy as we will use it in the next step.
Note the forwarding address provided by Ngrok. For example, **`25f6-2402-e280-2189-38e-9c15-d08-2f83-779e.ngrok-free.app`**.

> [!IMPORTANT]
> Keep this address handy as we will use it in the next step.
### Connect to SurrealDB via the Ngrok Address

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ You will also need to [have an Amazon Web Services account](https://aws.amazon.c

## Configuring AWS Cognito

In this section, we will create a user pool and a client that will be used to authenticate users with AWS Cognito.

### Creating a User Pool and a Client

Cognito offers [user pools](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html) as a user directory for mobile and web applications. This directory can hold users defined directly within Cognito, but can also integrate with third-party identity providers like Google and Facebook. Additionally, it provides the ability to handle user registrations directly in the [Cognito Hosted UI](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app-integration.html), which can also take care of requiring specific information, verifying user email addresses and phone numbers or even enforcing multi-factor authentication. Within a user pool, [creating a client](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-client-apps.html#cognito-user-pools-app-idp-settings-console-create) establishes a method (in our case a client-side web application) to authenticate with the user pool.
Expand Down Expand Up @@ -284,8 +286,6 @@ It is also important to note that the `$auth` variable accessible from SurrealQL

</Tabs>



## Creating a Simple Web Application

For this guide, we will create a simple client-side web application that will direct the user to log in using the Cognito Hosted UI, redirect the user back your our application with a query parameter containing an authorization code and exchange that code to Cognito for the user identity token which we will use to authenticate with SurrealDB. The application will create or update a SurrealDB user using data from the token claims. This user will later be able visit our web application and retrieve their information from SurrealDB.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The above command starts SurrealDB with [authentication](/docs/surrealdb/cli/sta

After running locally, head over to Postman and create a fork for your workspace. You should see all the endpoints listed. You can also [check the endpoints in the documentation](/docs/surrealdb/integration/http).

## Using [`INFO` Statement](/docs/surrealql/statements/info)
## Using the `INFO` Statement

You can get information about your workspace by using the INFO statement. However, you need the right permissions in order to see the output. See the documentation for the [INFO statement](/docs/surrealql/statements/info).

Expand Down

0 comments on commit 802f8ba

Please sign in to comment.