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

chore: Add authentication to web app #1876

Merged
merged 1 commit into from
Jan 23, 2024
Merged

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Jan 23, 2024

Adds authentication to our web app api and frontend.

  • The user is automatically logged out after 5 mins of inactivity (not navigating)
  • The session is invalidated after 1 hour of inactivity.
  • The session is kept in memory, that means if the web app server is restarted the user is also logged out.
  • The password can be specified via the cli (default: "satoshi")
  • To run on https you will have to specify the --secure flag on cli
  • Use just run-web to make use of flutter development

authentication

@holzeis holzeis self-assigned this Jan 23, 2024
@holzeis holzeis linked an issue Jan 23, 2024 that may be closed by this pull request
@holzeis holzeis force-pushed the feat/add-authentication-to-webapp branch from 67db021 to 62a36ca Compare January 23, 2024 10:59
@holzeis holzeis force-pushed the feat/add-authentication-to-webapp branch from 62a36ca to d3e89a6 Compare January 23, 2024 12:18
webapp/src/main.rs Outdated Show resolved Hide resolved
@@ -103,21 +125,14 @@ async fn main() -> Result<()> {
.serve(app.into_make_service())
.await?;

deletion_task.await??;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will never be called because the call above blocks the thread and if you hit ctrl+c in the console the app will terminate.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are right. But it doesn't hurt either does it? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, but it's useless 😅

@holzeis holzeis force-pushed the feat/add-authentication-to-webapp branch 5 times, most recently from 5345314 to 81ac857 Compare January 23, 2024 13:54
@holzeis holzeis force-pushed the feat/add-authentication-to-webapp branch from 81ac857 to 649b2b7 Compare January 23, 2024 14:43
Copy link
Contributor

@bonomat bonomat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets go

@holzeis holzeis added this pull request to the merge queue Jan 23, 2024
Merged via the queue into main with commit 2f514da Jan 23, 2024
9 checks passed
@holzeis holzeis deleted the feat/add-authentication-to-webapp branch January 23, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a simple login and authentication
2 participants