-
Notifications
You must be signed in to change notification settings - Fork 0
FusionAuth interview #1
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
Open
mrudatsprint
wants to merge
3
commits into
main
Choose a base branch
from
fusionauth-interview
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,10 +48,10 @@ flask --app server.py run | |
| If you're going to be working on the application and want hot reloads of the server code, add the `--debug` flag. | ||
|
|
||
| ```shell | ||
| flask --app server.py --debug run | ||
| flask --app server.py --debug run -p 5001 | ||
| ``` | ||
|
|
||
| Visit the local webserver at `http://localhost:5000/` and sign in using the credentials: | ||
| Visit the local webserver at `http://localhost:5001/` and sign in using the credentials: | ||
|
|
||
| * username: [email protected] | ||
| * password: password | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,4 @@ Authlib==1.2.0 | |
| Flask==2.3.2 | ||
| python-dotenv==1.0.0 | ||
| requests==2.31.0 | ||
| fusionauth-client==1.48.0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| <html> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <title>FusionAuth OpenID and PKCE example</title> | ||
| <link rel="stylesheet" href="/static/css/changebank.css"> | ||
| </head> | ||
| <body> | ||
| <div id="page-container"> | ||
| <div id="page-header"> | ||
| <div id="logo-header"> | ||
| <img src="https://fusionauth.io/assets/img/samplethemes/changebank/changebank.svg" /> | ||
| <div class="h-row"> | ||
| <p class="header-email">{{session["email"]}}</p> | ||
| <a class="button-lg" href={{logoutUrl}}>Logout</a> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div id="menu-bar" class="menu-bar"> | ||
| <a class="menu-link" href="/profile">Profile</a> | ||
| <a class="menu-link inactive" href="/make-change">Make Change</a> | ||
| <a class="menu-link inactive" href="/account">Account</a> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div style="flex: 1;"> | ||
| <div class="column-container"> | ||
| <div class="app-container profile-container"> | ||
| <h3>Current preferences</h3> | ||
|
|
||
| <form action="/profile" method="post"> | ||
| {% if profile["error"] is not none: %} | ||
| <div class="error-message">{{profile.error}}</div> | ||
| {% endif %} | ||
| {% if profile["registration_data"] %} | ||
| {% set registration_data = profile["registration_data"] %} | ||
| {% for key in registration_data.keys() %} | ||
| <p> | ||
| {% if key == 'favoritecolor' and registration_data['favoritecolor'] | length > 0 %} | ||
| Favorite Color: <input name='{{key}}' value='{{registration_data['favoritecolor']}}' /> | ||
| {% else %} | ||
| Favorite Color: <input name='{{key}}' value='' /> | ||
| {% endif %} | ||
| </p> | ||
| {% endfor %} | ||
| {% else %} | ||
| Favorite Color: <input name='favoritecolor' value='' /> | ||
| {% endif %} | ||
| <input type="submit" value="Update"></input> | ||
| </form> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Load Testing FusionAuth | ||
|
|
||
| Load testing FusionAuth should be performed using a realistic production configuration. The throughput goal should be to target a number of requests per second. | ||
|
|
||
| ## Configure FusionAuth | ||
| 1. Setup an API key | ||
|
|
||
| 2. Setup a tenant | ||
|
|
||
| 3. Setup an application | ||
|
|
||
| ## Running a load test | ||
| 1. Register users for the application | ||
|
|
||
| 2. Login users using the [Login API ](https://fusionauth.io/docs/apis/login) | ||
|
|
||
| ## Cleanup | ||
|
|
||
| Deleting the tenant will remove the application and users. | ||
|
|
||
| ## Load Testing Tools | ||
| A tool that can make HTTP requests will work. | ||
|
|
||
| 1. jmeter | ||
| https://jmeter.apache.org | ||
|
|
||
| 2. gatling | ||
| https://gatling.io | ||
|
|
||
|
|
||
| ## Helpful Articles | ||
|
|
||
| 1. FusionAuth [Documentation ](https://fusionauth.io/docs/operate/secure-and-monitor/monitor#load-testing) | ||
|
|
||
| 2. Load testing scripts from an [open source project ](https://github.com/FusionAuth/fusionauth-load-tests/) | ||
|
|
||
| 3. FusionAuth User Registration Hits 100,000,000 In [Load Test ](https://fusionauth.io/blog/got-users-100-million) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On my mac port 5000 was in use. I'm not sure what was using the port.
A possible solution is https://developer.apple.com/forums/thread/682332