Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mooreds/fix 404s from linkcheck #2473

Merged
merged 6 commits into from
Aug 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -222,29 +222,29 @@ 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`.

This URL will also need to be set in the Python scripts. Warning! It must be identical! Both here and in Python scripts: if it ends with `/` here it must end with `/` in the `.py` scripts.

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.

Set the correct Timezone by going to "Settings" then "System" then to the "Reports" tab and updating the "Report timezone" value.

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.

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

Expand Down
2 changes: 0 additions & 2 deletions astro/src/content/blog/implementing-fusionauth-python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions astro/src/content/blog/securely-implement-oauth-in-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.)

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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).

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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 `<textarea>` in the React app and then verifying that the data is updated in FusionAuth. The user data is displayed in FusionAuth on the Manage page for the user under the `User data` tab:

![admin user data](/assets/img/blogs/fusionauth-example-react/admin-user-data.png)
![The admin user data screen.](/img/blogs/fusionauth-example-react/admin-user-data.png)

However, it's a good idea to set the `<textarea>`'s `defaultValue` to the `userData`. This has two advantages: first, it allows us to inspect `userData` and confirm that it's maintained; second, it allows the user to edit the `userData`, rather than overwrite it each time.

Expand Down
2 changes: 1 addition & 1 deletion site/docs/v1/tech/core-concepts/users.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ You can navigate to the user's profile by clicking the icon:address-card[role=ui

The linked accounts tab allows you to manage the Identity Provider accounts which have been linked for this user.

Learn more about link:/docs/v1/tech/core-concepts/identity-providers/[Identity Providers] and link:/docs/v1/tech/identity-providers/links[Identity Provider links].
Learn more about link:/docs/v1/tech/core-concepts/identity-providers/[Identity Providers] and link:/docs/v1/tech/identity-providers/#linking-strategies[Identity Provider links].

image::core-concepts/user-identity-providers.png[User identity providers screen in the administrative user interface.,width=1200,role=bottom-cropped]

Expand Down
Loading