From a8e4dadb15de376ab40ae68c32a77ee23ce0f96f Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Fri, 18 Aug 2023 14:44:03 -0600 Subject: [PATCH 1/6] fixing images --- .../hotspot-with-fusionauth/adding-application.png | Bin .../blogs/hotspot-with-fusionauth/adding-user.png | Bin .../client-id-and-client-secret.png | Bin .../blogs/hotspot-with-fusionauth/setup-wizard.png | Bin .../blog/hotspot-authentication-with-fusionauth.mdx | 8 ++++---- 5 files changed, 4 insertions(+), 4 deletions(-) rename {site/assets => astro/public}/img/blogs/hotspot-with-fusionauth/adding-application.png (100%) rename {site/assets => astro/public}/img/blogs/hotspot-with-fusionauth/adding-user.png (100%) rename {site/assets => astro/public}/img/blogs/hotspot-with-fusionauth/client-id-and-client-secret.png (100%) rename {site/assets => astro/public}/img/blogs/hotspot-with-fusionauth/setup-wizard.png (100%) diff --git a/site/assets/img/blogs/hotspot-with-fusionauth/adding-application.png b/astro/public/img/blogs/hotspot-with-fusionauth/adding-application.png similarity index 100% rename from site/assets/img/blogs/hotspot-with-fusionauth/adding-application.png rename to astro/public/img/blogs/hotspot-with-fusionauth/adding-application.png diff --git a/site/assets/img/blogs/hotspot-with-fusionauth/adding-user.png b/astro/public/img/blogs/hotspot-with-fusionauth/adding-user.png similarity index 100% rename from site/assets/img/blogs/hotspot-with-fusionauth/adding-user.png rename to astro/public/img/blogs/hotspot-with-fusionauth/adding-user.png diff --git a/site/assets/img/blogs/hotspot-with-fusionauth/client-id-and-client-secret.png b/astro/public/img/blogs/hotspot-with-fusionauth/client-id-and-client-secret.png similarity index 100% rename from site/assets/img/blogs/hotspot-with-fusionauth/client-id-and-client-secret.png rename to astro/public/img/blogs/hotspot-with-fusionauth/client-id-and-client-secret.png diff --git a/site/assets/img/blogs/hotspot-with-fusionauth/setup-wizard.png b/astro/public/img/blogs/hotspot-with-fusionauth/setup-wizard.png similarity index 100% rename from site/assets/img/blogs/hotspot-with-fusionauth/setup-wizard.png rename to astro/public/img/blogs/hotspot-with-fusionauth/setup-wizard.png diff --git a/astro/src/content/blog/hotspot-authentication-with-fusionauth.mdx b/astro/src/content/blog/hotspot-authentication-with-fusionauth.mdx index ca026ff5fd..80e4c25968 100644 --- a/astro/src/content/blog/hotspot-authentication-with-fusionauth.mdx +++ b/astro/src/content/blog/hotspot-authentication-with-fusionauth.mdx @@ -222,7 +222,7 @@ ip addr Complete the set up and enter `postgres` for the root database user and the password you chose earlier for the root database user password. Wait for the set up to complete and then create the FusionAuth admin user, accepting the license. -![The setup wizard screen..](/img/blogs/hotspot-with-fusionauth/setup-wizard.png) +![The setup wizard screen.](/img/blogs/hotspot-with-fusionauth/setup-wizard.png) Now that you are logged in as the FusionAuth administrator, navigate to "Applications". Create an application (we'll use the name "WEBAuth"). In the OAuth section set the redirect link for authorized post login users to be the same IP with a port of 8080. For example: `http://192.168.144.133:8080`. @@ -230,13 +230,13 @@ This URL will also need to be set in the Python scripts. Warning! It must be ide Set the logout URL to `http://192.168.144.133` which is the address of the Apache server. We'll set this up later, but it will serve up a static html file to make logging in and out easier. Apache can run on this CentOS server, but it is not mandatory to use Apache, as all it is doing is serving up that html file with convenient links. You could use NGINX or any other web server you prefer. Don't forget, the IPs I use may be different from yours; make the appropriate changes. -![Adding the WEBAuth application..](/img/blogs/hotspot-with-fusionauth/adding-application.png) +![Adding the WEBAuth application.](/img/blogs/hotspot-with-fusionauth/adding-application.png) Save this application by clicking the blue disk icon. Now view the application from the list (the green magnifying glass), to get various information you will need about this application. Scroll down to the OAuth Configuration section and take note of the `Client ID` (which is the same as the application ID) and the `Client Secret`. These values will need to be set in the Python script covered below. -![Finding the Client ID and Client Secret..](/img/blogs/hotspot-with-fusionauth/client-id-and-client-secret.png) +![Finding the Client ID and Client Secret.](/img/blogs/hotspot-with-fusionauth/client-id-and-client-secret.png) Navigate to "Settings", then "API Keys" and create a key. Note the value of the key, as it will also have to be set in the Python scripts. @@ -244,7 +244,7 @@ Set the correct Timezone by going to "Settings" then "System" then to the "Repor Next, create a test user in FusionAuth. Navigate to "Users" then click "Add" (the green plus). It is not necessary to specify an email address. Uncheck "Send email to setup password". Make sure you set a "Username" and "Password". Save the new user. -![Adding a test user..](/img/blogs/hotspot-with-fusionauth/adding-user.png) +![Adding a test user.](/img/blogs/hotspot-with-fusionauth/adding-user.png) It is not necessary to add a registration for this user. We'll only be checking if a user can authenticate, not if they are authorized for a particular FusionAuth application or have a role. If you had different levels of users, such as a premium and entry level membership, you could create different roles and check for authorization in the Python script. From c616f27dda3199372efbe227d010e5f98ade7161 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Fri, 18 Aug 2023 14:47:46 -0600 Subject: [PATCH 2/6] handling another 404 image --- .../img/blogs/integrate-php}/php-blog-user.png | Bin .../blog/how-to-integrate-fusionauth-with-php.mdx | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename {site/assets/img/blogs => astro/public/img/blogs/integrate-php}/php-blog-user.png (100%) diff --git a/site/assets/img/blogs/php-blog-user.png b/astro/public/img/blogs/integrate-php/php-blog-user.png similarity index 100% rename from site/assets/img/blogs/php-blog-user.png rename to astro/public/img/blogs/integrate-php/php-blog-user.png diff --git a/astro/src/content/blog/how-to-integrate-fusionauth-with-php.mdx b/astro/src/content/blog/how-to-integrate-fusionauth-with-php.mdx index 9e0d98a9ac..99afb96f61 100644 --- a/astro/src/content/blog/how-to-integrate-fusionauth-with-php.mdx +++ b/astro/src/content/blog/how-to-integrate-fusionauth-with-php.mdx @@ -199,7 +199,7 @@ Lastly, we incorporated error handling to let us see any errors encountered duri If we run the `index.php` file and navigate to our FusionAuth UI, we can see that the user has been registered successfully under the users' section. -![Successful user registration.](/img/blogs/php-blog-user.png) +![Successful user registration.](/img/blogs/integrate-php/php-blog-user.png) On the other hand, if we try posting the same registration request again, we get a series of **duplicate** errors on the web browser, showing that the user already exists. Logging such [API errors](/docs/v1/tech/apis/errors) can assist you in debugging when integrating FusionAuth with PHP. From 6d474c748d2de1dd793516b64365759ec8556711 Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Fri, 18 Aug 2023 14:50:44 -0600 Subject: [PATCH 3/6] handling 404 images --- .../public/img/blogs}/add-application.png | Bin .../public/img/blogs}/add-user-api.png | Bin .../public/img/blogs}/add-user-registration.png | Bin .../public/img/blogs}/add-user-ui.png | Bin .../public/img/blogs}/applications.png | Bin .../public/img/blogs}/manage-user.png | Bin .../content/blog/implementing-fusionauth-python.mdx | 2 -- 7 files changed, 2 deletions(-) rename {site/assets/img/blogs/implementing-fusionauth-python => astro/public/img/blogs}/add-application.png (100%) rename {site/assets/img/blogs/implementing-fusionauth-python => astro/public/img/blogs}/add-user-api.png (100%) rename {site/assets/img/blogs/implementing-fusionauth-python => astro/public/img/blogs}/add-user-registration.png (100%) rename {site/assets/img/blogs/implementing-fusionauth-python => astro/public/img/blogs}/add-user-ui.png (100%) rename {site/assets/img/blogs/implementing-fusionauth-python => astro/public/img/blogs}/applications.png (100%) rename {site/assets/img/blogs/implementing-fusionauth-python => astro/public/img/blogs}/manage-user.png (100%) diff --git a/site/assets/img/blogs/implementing-fusionauth-python/add-application.png b/astro/public/img/blogs/add-application.png similarity index 100% rename from site/assets/img/blogs/implementing-fusionauth-python/add-application.png rename to astro/public/img/blogs/add-application.png diff --git a/site/assets/img/blogs/implementing-fusionauth-python/add-user-api.png b/astro/public/img/blogs/add-user-api.png similarity index 100% rename from site/assets/img/blogs/implementing-fusionauth-python/add-user-api.png rename to astro/public/img/blogs/add-user-api.png diff --git a/site/assets/img/blogs/implementing-fusionauth-python/add-user-registration.png b/astro/public/img/blogs/add-user-registration.png similarity index 100% rename from site/assets/img/blogs/implementing-fusionauth-python/add-user-registration.png rename to astro/public/img/blogs/add-user-registration.png diff --git a/site/assets/img/blogs/implementing-fusionauth-python/add-user-ui.png b/astro/public/img/blogs/add-user-ui.png similarity index 100% rename from site/assets/img/blogs/implementing-fusionauth-python/add-user-ui.png rename to astro/public/img/blogs/add-user-ui.png diff --git a/site/assets/img/blogs/implementing-fusionauth-python/applications.png b/astro/public/img/blogs/applications.png similarity index 100% rename from site/assets/img/blogs/implementing-fusionauth-python/applications.png rename to astro/public/img/blogs/applications.png diff --git a/site/assets/img/blogs/implementing-fusionauth-python/manage-user.png b/astro/public/img/blogs/manage-user.png similarity index 100% rename from site/assets/img/blogs/implementing-fusionauth-python/manage-user.png rename to astro/public/img/blogs/manage-user.png diff --git a/astro/src/content/blog/implementing-fusionauth-python.mdx b/astro/src/content/blog/implementing-fusionauth-python.mdx index bba52d0fda..79931f5433 100644 --- a/astro/src/content/blog/implementing-fusionauth-python.mdx +++ b/astro/src/content/blog/implementing-fusionauth-python.mdx @@ -18,8 +18,6 @@ Welcome to our FusionAuth Python Library introduction tutorial! Today we will ta Our goal is to demonstrate the basics of FusionAuth and let you verify your API credentials before diving into functional FusionAuth client library web applications using Python frameworks and micro frameworks like Django and Flask. Of course if you're already familiar with FusionAuth and have these libraries and dependencies installed, you can go ahead and skip to the next section [Deactivating, Reactivating, and Deleting A FusionAuth User in Python](/blog/2019/10/08/deactivating-reactivating-deleting-user-fusionauth-python)! -**Most recently updated August 23, 2021.** - ## What we'll cover 1. Installing FusionAuth and initializing services From 9127615423580abe842ccaf55e550025a0ef95cd Mon Sep 17 00:00:00 2001 From: Dan Moore Date: Fri, 18 Aug 2023 14:56:41 -0600 Subject: [PATCH 4/6] Image URL wasn't correctly updated --- .../blog/securely-implement-oauth-in-react.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/astro/src/content/blog/securely-implement-oauth-in-react.mdx b/astro/src/content/blog/securely-implement-oauth-in-react.mdx index 81afabb4ee..eab2e5b6e6 100644 --- a/astro/src/content/blog/securely-implement-oauth-in-react.mdx +++ b/astro/src/content/blog/securely-implement-oauth-in-react.mdx @@ -52,7 +52,7 @@ React client <-> Express server <-> FusionAuth Literally, it might look something like this: -![finished app](/img/blogs/fusionauth-example-react/app-finished.png) +![The finished app.](/img/blogs/fusionauth-example-react/app-finished.png) (Although, you're on your own for CSS.) @@ -80,13 +80,13 @@ docker compose up Once FusionAuth is running (by default at [localhost:9011](http://localhost:9011)), create a new Application. The only configurations you need to change are `Authorized redirect URLs` and `Logout URL` on the `OAuth` tab. These are basically links used by FusionAuth during the only two times we redirect off our app entirely: login and logout. After a user logs in, FusionAuth will redirect them back to our app on one of the `Authorized Redirect URLs`. After a user logs out, FusionAuth will redirect them to the `Logout URL`. -![FusionAuth application edit page](/img/blogs/fusionauth-example-react/admin-edit-application.png) +![The FusionAuth application edit page.](/img/blogs/fusionauth-example-react/admin-edit-application.png) We'll talk later about why we use these particular URLs. For now, enter `http://localhost:9000/oauth-callback` for the `Authorized Redirect URL` (a point on our Express server) and `http://localhost:8080` for the `Logout URL` (the only endpoint on our single page React client). Click the blue `Save` button in the top-right to finish the configuration. A login feature isn't very useful with zero users. It's possible to register users from your app or using FusionAuth's self-service registration feature, but we'll manually add a user for this example. Select `Users` from the menu. You should see your own account; it's already registered to FusionAuth, which is why you can use it to log into the admin panel. -![admin manage user](/img/blogs/fusionauth-example-react/admin-manage-user.png) +![The admin manage user screen.](/img/blogs/fusionauth-example-react/admin-manage-user.png) Select `Manage` and go to the `Registrations` tab. Click on `Add Registration`, pick your new application, and then `Save` to register yourself. @@ -171,7 +171,7 @@ Storing configuration this way saves us from a lot of `CMD-F` pain when changing The OAuth and FusionAuth configuration above will not match your application. I copied it out of my FusionAuth admin panel. This is the only code in the whole article you can't just copy/paste, seriously. The best place to find your values is this `View` button in the Applications page: -![admin view application](/img/blogs/fusionauth-example-react/admin-view-application.png) +![The admin view application screen.](/img/blogs/fusionauth-example-react/admin-view-application.png) (Also, if you do want to copy/paste everything, just [clone the GitHub repo](https://github.com/FusionAuth/fusionauth-example-react) with everything already in it. You'll still have to change this config file, though. No way around that). @@ -609,7 +609,7 @@ This is all standard OAuth flow but it is a little verbose. Try navigating to `localhost:9000/login`. You should see a FusionAuth login form: -![app login](/img/blogs/fusionauth-example-react/app-login.png) +![Application login.](/img/blogs/fusionauth-example-react/app-login.png) When you successfully authenticate, you'll just see `Cannot GET /oauth-callback`, because `/oauth-callback` doesn't exist, yet. Remember, we added that as an `Authorized redirect URL` in the FusionAuth admin panel and as our `redirectURI` in `config.js`. This is the location that where FusionAuth redirects the browser back to after authentication in order to complete the OAuth workflow. @@ -1091,7 +1091,7 @@ export default class LogInOut extends React.Component { Once everything is hooked up, you can test it out by typing something into the `