Draft
Conversation
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a slimmed down version of #497 to implement the bare minimum of auth as defined by NUT-21 and 22
For now this implementation automatically redirects the user to the mint's login page whenever a CAT is needed. We need to figure out a way to pop up a modal to ask the user before redirecting.
Then after the user is authenticated we should redirect them to whatever action they were doing. For example, when adding a mint the user will enter the mint details, click "add", authenticate, and then they should be redirected to the add mint form prefilled with what they already added.
Also for minting we need to check whether auth is required for any of the mint endpoints before allowing the user to create a mint quote because creating a mint quote may not require auth, but actually minting the ecash could. We do not want the user to get a mint quote unless we know they will be able to complete the minting flow.
Testing
To test you will need a mint that has auth enabled. This PR is into #591, so all you need to do to run the mint is
devenv processes up. This will start a mint on localhost:8085. You will also need to configure a keycloak user and access settings. See the README hereOnce you have keycloak configured with the correct redirect-url and a user, then you can add the mint