From d00cb51974cc247bb6ca0c1ac7cf148fcf2a1e31 Mon Sep 17 00:00:00 2001 From: Dhghomon Date: Thu, 24 Oct 2024 22:58:06 +0900 Subject: [PATCH 1/3] Prune some log traces from examples --- .../doc-surrealdb/installation/running/docker.mdx | 6 +++--- .../doc-surrealdb/installation/running/file.mdx | 8 ++++---- .../doc-surrealdb/installation/running/memory.mdx | 10 +++++----- .../doc-surrealdb/installation/running/tikv.mdx | 6 +++--- .../integrate-auth0-as-authentication-provider.mdx | 2 +- ...ntegrate-aws-cognito-as-authentication-provider.mdx | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/content/doc-surrealdb/installation/running/docker.mdx b/src/content/doc-surrealdb/installation/running/docker.mdx index 269b9c882..c9543e3e7 100644 --- a/src/content/doc-surrealdb/installation/running/docker.mdx +++ b/src/content/doc-surrealdb/installation/running/docker.mdx @@ -41,7 +41,7 @@ mkdir mydata # Create a directory to store the database, owned by the current us docker run --rm --pull always -p 8000:8000 --user $(id -u) -v $(pwd)/mydata:/mydata surrealdb/surrealdb:latest start rocksdb:/mydata/mydatabase.db ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, resulting in most logs being output to the terminal. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, resulting in most logs being output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash mkdir mydata # Create a directory to store the database, owned by the current user @@ -57,13 +57,13 @@ To set up access as an authenticated user, configure your initial root-level use The following command starts the database with a top-level user named `root` with a password also set to `root`. The root user will be persisted in storage, which means you don't have to include the command line arguments next time you start SurrealDB. ```bash -docker run --rm --pull always -p 80:8000 -v /mydata:/mydata surrealdb/surrealdb:latest start --log trace --user root --pass root rocksdb:mydatabase.db +docker run --rm --pull always -p 80:8000 -v /mydata:/mydata surrealdb/surrealdb:latest start --user root --pass root rocksdb:mydatabase.db ``` In order to change the default port that SurrealDB uses for web connections and from database clients you can use the Docker *`-p`* command line argument to tunnel the port to the internal SurrealDB port which SurrealDB is served on. The following command starts the database on port `80`. ```bash -docker run --rm --pull always -p 80:8000 -v /mydata:/mydata surrealdb/surrealdb:latest start --log trace --user root --pass root rocksdb:/mydata/mydatabase.db +docker run --rm --pull always -p 80:8000 -v /mydata:/mydata surrealdb/surrealdb:latest start --user root --pass root rocksdb:/mydata/mydatabase.db ``` After running the above command, you should see the SurrealDB server startup successfully. diff --git a/src/content/doc-surrealdb/installation/running/file.mdx b/src/content/doc-surrealdb/installation/running/file.mdx index 8c5498751..cb1473ece 100644 --- a/src/content/doc-surrealdb/installation/running/file.mdx +++ b/src/content/doc-surrealdb/installation/running/file.mdx @@ -13,7 +13,7 @@ For the purposes of getting started with SurrealDB quickly, we will start a Rock surreal start rocksdb:mydatabase.db ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, resulting in most logs being output to the terminal. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash surreal start --log trace rocksdb:mydatabase.db @@ -22,19 +22,19 @@ surreal start --log trace rocksdb:mydatabase.db In versions of SurrealDB before 2.0.0, anyone would be able to connect to this server to begin running queries. However, SurrealDB since version 2.0.0 runs with authentication by default. In order to disable it, the `--unauthenticated` flag can be passed in. ```bash -surreal start --log trace --unauthenticated rocksdb:mydatabase.db +surreal start --unauthenticated rocksdb:mydatabase.db ``` However, for anything but simple testing, it is better to configure your initial root-level user by setting the *`--user`* and *`--pass`* command-line arguments. The following command starts the database with a top-level user named root with a password also set to `root`. The root user will be persisted in storage, which means you don't have to include the command line arguments next time you start SurrealDB. ```bash -surreal start --log trace --user root --pass root rocksdb:mydatabase.db +surreal start --user root --pass root rocksdb:mydatabase.db ``` In order to change the default port that SurrealDB uses for web connections and from database clients you can use the *`--bind`* argument. The following command starts the database on port `8080`. ```bash -surreal start --log trace --user root --pass root --bind 0.0.0.0:8080 rocksdb://path/to/mydatabase +surreal start --user root --pass root --bind 0.0.0.0:8080 rocksdb://path/to/mydatabase ``` After running the above command, you should see the SurrealDB server startup successfully. diff --git a/src/content/doc-surrealdb/installation/running/memory.mdx b/src/content/doc-surrealdb/installation/running/memory.mdx index ff7785ced..fefdfbf3e 100644 --- a/src/content/doc-surrealdb/installation/running/memory.mdx +++ b/src/content/doc-surrealdb/installation/running/memory.mdx @@ -19,7 +19,7 @@ SurrealDB will assume `memory` in case this argument is not passed in, so the fo surreal start ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, resulting in most logs being output to the terminal. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash surreal start --log trace memory @@ -28,24 +28,24 @@ surreal start --log trace memory In versions of SurrealDB before `2.0`, anyone would be able to connect to this server to begin running queries. However, SurrealDB since version `2.0` runs with authentication by default. In order to disable it, the `--unauthenticated` flag can be passed in. ```bash -surreal start --log trace --unauthenticated memory +surreal start --unauthenticated memory ``` However, for anything but simple testing, it is better to configure your initial root-level user by setting the *`--user`* and *`--pass`* command-line arguments. The following command starts the database with a top-level user named `root` with a password also set to `root`. ```bash -surreal start --log trace --user root --pass root memory +surreal start --user root --pass root memory ``` The previous command will bootstrap the server with the provided initial credentials, you can now remove those args and rely on [DEFINE USER](/docs/surrealql/statements/define/user) to change the password or create more users. ```bash -surreal start --log trace --user username --pass 123456 memory +surreal start --user username --pass 123456 memory ``` In order to change the default port that SurrealDB uses for web connections and from database clients you can use the *`--bind`* argument. The following command starts the database on port `8080`. ```bash -surreal start --log trace --user root --pass root --bind 0.0.0.0:8080 memory +surreal start --user root --pass root --bind 0.0.0.0:8080 memory ``` After running the above command, you should see the SurrealDB server startup successfully. diff --git a/src/content/doc-surrealdb/installation/running/tikv.mdx b/src/content/doc-surrealdb/installation/running/tikv.mdx index ec1a53819..21a1a2abb 100644 --- a/src/content/doc-surrealdb/installation/running/tikv.mdx +++ b/src/content/doc-surrealdb/installation/running/tikv.mdx @@ -23,7 +23,7 @@ Once TiKV is up and running, we can start a SurrealDB server instance, specifyin ```bash surreal start tikv://127.0.0.1:2379 ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, resulting in most logs being output to the terminal. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. ```bash surreal start --log trace tikv://127.0.0.1:2379 @@ -31,12 +31,12 @@ surreal start --log trace tikv://127.0.0.1:2379 In order to keep SurrealDB secure, configure your initial root-level user by setting the *`--user`* and *`--pass`* command-line arguments. The following command starts the database with a top-level user named root with a password also set to `root`. The root user will be persisted in storage, which means you don't have to include the command line arguments next time you start SurrealDB. ```bash -surreal start --log trace --user root --pass root tikv://127.0.0.1:2379 +surreal start --user root --pass root tikv://127.0.0.1:2379 ``` In order to change the default port that SurrealDB uses for web connections and from database clients you can use the *`--bind`* argument. The following command starts the database on port `8080`. ```bash -surreal start --log trace --user root --pass root --bind 0.0.0.0:8080 tikv://placement.driver.hostname.or.ip:2379 +surreal start --user root --pass root --bind 0.0.0.0:8080 tikv://placement.driver.hostname.or.ip:2379 ``` After running the above command, you should see the SurrealDB server startup successfully. diff --git a/src/content/doc-tutorials/integrate-auth0-as-authentication-provider.mdx b/src/content/doc-tutorials/integrate-auth0-as-authentication-provider.mdx index da441ed2e..2186eee44 100644 --- a/src/content/doc-tutorials/integrate-auth0-as-authentication-provider.mdx +++ b/src/content/doc-tutorials/integrate-auth0-as-authentication-provider.mdx @@ -33,7 +33,7 @@ This guide assumes the following: ```bash docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest \ - start --log trace --user root --pass root + start --user root --pass root ``` To run the SurrealQL statements mentioned in this guide, you will also need an interactive shell. diff --git a/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx b/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx index 8f6b007e1..1893afb31 100644 --- a/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx +++ b/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx @@ -34,7 +34,7 @@ This guide assumes the following: ```bash docker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest \ - start --log trace --user root --pass root + start --user root --pass root ``` To run the SurrealQL statements mentioned in this guide, you will also need an interactive shell. From 10a4980ea8ca71aa1142a88c182976ee8e7de630 Mon Sep 17 00:00:00 2001 From: Dhghomon Date: Thu, 24 Oct 2024 23:05:10 +0900 Subject: [PATCH 2/3] Two more places --- src/content/doc-surrealdb/installation/running/tikv.mdx | 2 +- .../integrate-aws-cognito-as-authentication-provider.mdx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/doc-surrealdb/installation/running/tikv.mdx b/src/content/doc-surrealdb/installation/running/tikv.mdx index 21a1a2abb..cd1b65ff5 100644 --- a/src/content/doc-surrealdb/installation/running/tikv.mdx +++ b/src/content/doc-surrealdb/installation/running/tikv.mdx @@ -23,7 +23,7 @@ Once TiKV is up and running, we can start a SurrealDB server instance, specifyin ```bash surreal start tikv://127.0.0.1:2379 ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash surreal start --log trace tikv://127.0.0.1:2379 diff --git a/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx b/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx index 1893afb31..3300e4222 100644 --- a/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx +++ b/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx @@ -296,7 +296,7 @@ For this guide, we will create a simple client-side web application that will di We have developed an [example application](https://github.com/surrealdb/examples/tree/main/aws-cognito) that uses plain JavaScript to authenticate with Cognito using basic HTTP requests against the [login endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/login-endpoint.html) of the Cognito Hosted UI and the Cognito [token endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html). For the purposes of following this guide, we recommend using our example code. However, keep in mind that this code aims to be as simple as possible and is not suitable for production applications. Alternatively, you can develop this application yourself using the [Cognito SDK](https://docs.aws.amazon.com/cognito/latest/developerguide/service_code_examples_cognito-identity-provider.html) or the new [Amplify SDK](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-integrate-apps.html#cognito-integrate-apps-amplify). -When using our example code, you will only need to update the `config.json` file with the values that you saved after creating your user pool and run the web application using the `start.sh` script or any equivalent web server. Once in the web application, clicking the "Log in" button should take you to the Cognito Hosted UI to log in with your test user, after which you should be redirected back to your web application. For this to work, the URL of your web application (without a trailing slash) should be present in the "Allowed callback URLs" list that you defined when configuring the user pool client. After redirection, the web application will show some information about the authenticated user and attempt to create it in SurrealDB via the configured endpoint. After the user is created, subsequent logins will retrieve its information from SurrealDB and display it in the web application. If that is not the case, use the developer console of your browser together with the SurrealDB logs (ideally running with `--log trace`) to understand why. +When using our example code, you will only need to update the `config.json` file with the values that you saved after creating your user pool and run the web application using the `start.sh` script or any equivalent web server. Once in the web application, clicking the "Log in" button should take you to the Cognito Hosted UI to log in with your test user, after which you should be redirected back to your web application. For this to work, the URL of your web application (without a trailing slash) should be present in the "Allowed callback URLs" list that you defined when configuring the user pool client. After redirection, the web application will show some information about the authenticated user and attempt to create it in SurrealDB via the configured endpoint. After the user is created, subsequent logins will retrieve its information from SurrealDB and display it in the web application. If that is not the case, use the developer console of your browser together with the SurrealDB logs (running with `--log trace` during the debugging for extra verbosity) to understand why. Once the example web application is working, you can inspect the simple code under `app.js` to understand how. From 9224f1ad4d10614cdd963f08458bc1ead629e640 Mon Sep 17 00:00:00 2001 From: Dhghomon Date: Thu, 24 Oct 2024 23:20:13 +0900 Subject: [PATCH 3/3] Default to debug level for most examples --- src/content/doc-surrealdb/cli/start.mdx | 4 ++-- src/content/doc-surrealdb/installation/running/docker.mdx | 4 ++-- src/content/doc-surrealdb/installation/running/file.mdx | 4 ++-- src/content/doc-surrealdb/installation/running/memory.mdx | 4 ++-- src/content/doc-surrealdb/installation/running/tikv.mdx | 4 ++-- .../integrate-aws-cognito-as-authentication-provider.mdx | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/content/doc-surrealdb/cli/start.mdx b/src/content/doc-surrealdb/cli/start.mdx index ecec089d1..71f82a63a 100644 --- a/src/content/doc-surrealdb/cli/start.mdx +++ b/src/content/doc-surrealdb/cli/start.mdx @@ -344,10 +344,10 @@ An instance with a single root user, able to connect to the internet but unable surreal start --user root --pass root --allow-net --deny-funcs "crypto::md5, http::post, http::delete" ``` -An instance with extra verbose logging that uses RocksDB as its storage engine: +An instance with more verbose logging that uses RocksDB as its storage engine: ```bash -surreal start --log trace rocksdb:mydatabase.db +surreal start --log debug rocksdb:mydatabase.db ``` An instance with all capabilities denied except a few functions and a single endpoint: diff --git a/src/content/doc-surrealdb/installation/running/docker.mdx b/src/content/doc-surrealdb/installation/running/docker.mdx index c9543e3e7..cd7e70488 100644 --- a/src/content/doc-surrealdb/installation/running/docker.mdx +++ b/src/content/doc-surrealdb/installation/running/docker.mdx @@ -41,11 +41,11 @@ mkdir mydata # Create a directory to store the database, owned by the current us docker run --rm --pull always -p 8000:8000 --user $(id -u) -v $(pwd)/mydata:/mydata surrealdb/surrealdb:latest start rocksdb:/mydata/mydatabase.db ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, resulting in most logs being output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `debug` level logging, resulting in more logs being output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash mkdir mydata # Create a directory to store the database, owned by the current user -docker run --rm --pull always -p 8000:8000 --user $(id -u) -v $(pwd)/mydata:/mydata surrealdb/surrealdb:latest start --log trace rocksdb:/mydata/mydatabase.db +docker run --rm --pull always -p 8000:8000 --user $(id -u) -v $(pwd)/mydata:/mydata surrealdb/surrealdb:latest start --log debug rocksdb:/mydata/mydatabase.db ``` ### Configuring authentication diff --git a/src/content/doc-surrealdb/installation/running/file.mdx b/src/content/doc-surrealdb/installation/running/file.mdx index cb1473ece..d8713fc2d 100644 --- a/src/content/doc-surrealdb/installation/running/file.mdx +++ b/src/content/doc-surrealdb/installation/running/file.mdx @@ -13,10 +13,10 @@ For the purposes of getting started with SurrealDB quickly, we will start a Rock surreal start rocksdb:mydatabase.db ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `debug` level logging, resulting in more logs being output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash -surreal start --log trace rocksdb:mydatabase.db +surreal start --log debug rocksdb:mydatabase.db ``` In versions of SurrealDB before 2.0.0, anyone would be able to connect to this server to begin running queries. However, SurrealDB since version 2.0.0 runs with authentication by default. In order to disable it, the `--unauthenticated` flag can be passed in. diff --git a/src/content/doc-surrealdb/installation/running/memory.mdx b/src/content/doc-surrealdb/installation/running/memory.mdx index fefdfbf3e..43758ea8c 100644 --- a/src/content/doc-surrealdb/installation/running/memory.mdx +++ b/src/content/doc-surrealdb/installation/running/memory.mdx @@ -19,10 +19,10 @@ SurrealDB will assume `memory` in case this argument is not passed in, so the fo surreal start ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `debug` level logging, resulting in more logs being output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash -surreal start --log trace memory +surreal start --log debug memory ``` In versions of SurrealDB before `2.0`, anyone would be able to connect to this server to begin running queries. However, SurrealDB since version `2.0` runs with authentication by default. In order to disable it, the `--unauthenticated` flag can be passed in. diff --git a/src/content/doc-surrealdb/installation/running/tikv.mdx b/src/content/doc-surrealdb/installation/running/tikv.mdx index cd1b65ff5..0b998f9a3 100644 --- a/src/content/doc-surrealdb/installation/running/tikv.mdx +++ b/src/content/doc-surrealdb/installation/running/tikv.mdx @@ -23,10 +23,10 @@ Once TiKV is up and running, we can start a SurrealDB server instance, specifyin ```bash surreal start tikv://127.0.0.1:2379 ``` -The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `trace` level logging, the maximum level of verbosity for output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. +The default logging level for the database server is `info`, resulting in any informational logs to be output to the standard output. To control the logging verbosity, specify the *`--log`* argument. The following command starts the database with `debug` level logging, resulting in more logs being output to the terminal. If extra verbosity is not needed, specify a lower level or simply remove the flag, which will default to the `info` level. ```bash -surreal start --log trace tikv://127.0.0.1:2379 +surreal start --log debug tikv://127.0.0.1:2379 ``` In order to keep SurrealDB secure, configure your initial root-level user by setting the *`--user`* and *`--pass`* command-line arguments. The following command starts the database with a top-level user named root with a password also set to `root`. The root user will be persisted in storage, which means you don't have to include the command line arguments next time you start SurrealDB. diff --git a/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx b/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx index 3300e4222..e18ffab45 100644 --- a/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx +++ b/src/content/doc-tutorials/integrate-aws-cognito-as-authentication-provider.mdx @@ -296,7 +296,7 @@ For this guide, we will create a simple client-side web application that will di We have developed an [example application](https://github.com/surrealdb/examples/tree/main/aws-cognito) that uses plain JavaScript to authenticate with Cognito using basic HTTP requests against the [login endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/login-endpoint.html) of the Cognito Hosted UI and the Cognito [token endpoint](https://docs.aws.amazon.com/cognito/latest/developerguide/token-endpoint.html). For the purposes of following this guide, we recommend using our example code. However, keep in mind that this code aims to be as simple as possible and is not suitable for production applications. Alternatively, you can develop this application yourself using the [Cognito SDK](https://docs.aws.amazon.com/cognito/latest/developerguide/service_code_examples_cognito-identity-provider.html) or the new [Amplify SDK](https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-integrate-apps.html#cognito-integrate-apps-amplify). -When using our example code, you will only need to update the `config.json` file with the values that you saved after creating your user pool and run the web application using the `start.sh` script or any equivalent web server. Once in the web application, clicking the "Log in" button should take you to the Cognito Hosted UI to log in with your test user, after which you should be redirected back to your web application. For this to work, the URL of your web application (without a trailing slash) should be present in the "Allowed callback URLs" list that you defined when configuring the user pool client. After redirection, the web application will show some information about the authenticated user and attempt to create it in SurrealDB via the configured endpoint. After the user is created, subsequent logins will retrieve its information from SurrealDB and display it in the web application. If that is not the case, use the developer console of your browser together with the SurrealDB logs (running with `--log trace` during the debugging for extra verbosity) to understand why. +When using our example code, you will only need to update the `config.json` file with the values that you saved after creating your user pool and run the web application using the `start.sh` script or any equivalent web server. Once in the web application, clicking the "Log in" button should take you to the Cognito Hosted UI to log in with your test user, after which you should be redirected back to your web application. For this to work, the URL of your web application (without a trailing slash) should be present in the "Allowed callback URLs" list that you defined when configuring the user pool client. After redirection, the web application will show some information about the authenticated user and attempt to create it in SurrealDB via the configured endpoint. After the user is created, subsequent logins will retrieve its information from SurrealDB and display it in the web application. If that is not the case, use the developer console of your browser together with the SurrealDB logs (running with `--log trace` during the debugging for maximum verbosity) to understand why. Once the example web application is working, you can inspect the simple code under `app.js` to understand how.