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

Refactor Auth Flow #58

Closed
fisher60 opened this issue Oct 26, 2023 · 2 comments
Closed

Refactor Auth Flow #58

fisher60 opened this issue Oct 26, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request vulnerability

Comments

@fisher60
Copy link
Member

fisher60 commented Oct 26, 2023

We have decided on a more secure and standard auth flow that will allow us to use AbandonAuth as it was intended (serving as an identity and OAuth provider for many different applications).

The flow is as follows:
auth_flow

  1. Client initiates a login request to AbandonAuth and includes application ID and redirect UI to the backend. AbandonAuth verifies this is a valid app id and callback URI combo
  2. login with discord, basic stuff,
  3. redirect to AbandonAuth
  4. Using the verified redirect URI from 1, forward the login request with an exchange token with identity permissions for AbandonAuth and possibly an aud of the application ID (redundant, but maybe more secure)
  5. Use the exchange token to authenticate a user/identify user on abandon auth and using the backend's own access token. AbandonAuth confirms the exchange token is valid and the aud claim matches the authenticated developer application that sent the request
  6. AbandonAuth sends a long-lived identify token for the user. This token does not have permission to login on AbandonAuth as the user, but just has identify permissions.
  7. The user is now authenticated and the application can do whatever it deems fit with the user's session. Most likely the application will redirect the user to the correct, known frontend application as defined by the backend and either issue a new token, or allow the frontend to store the AbandonAuth token to keep the user authenticated.

This solution was originally identified in #29 to solve known security issues.

@fisher60 fisher60 added enhancement New feature or request vulnerability labels Oct 26, 2023
@fisher60 fisher60 self-assigned this Oct 26, 2023
@fisher60 fisher60 added this to the Initial Release milestone Oct 26, 2023
@fisher60
Copy link
Member Author

We will need to replace the auth flow diagrams in the readme as well. An enhanced version of the above diagram should be created for use in the actual readme. It will contain clear descriptions of each step. It may be useful to include multiple, similar auth flows for different types of deployments (Separate frontend/backend, server side rendered applications, frontend only applications).

@fisher60 fisher60 changed the title Redesign Auth Flow Refactor Auth Flow Oct 27, 2023
@fisher60
Copy link
Member Author

fisher60 commented Nov 5, 2023

New auth flow diagrams bumped to #61

@fisher60 fisher60 closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vulnerability
Projects
None yet
Development

No branches or pull requests

1 participant