Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Still a very early version of auth.
I created a new OIDC-client lib file that should be able to genericaly handle the oidc auth protocol. I originally started with using the
oidc-client-tslib, but its pretty large and the implementation is fairly simple so it didn't seem worth the added dependency.Then, there is the cashu-auth that creates a zustand store to manage all the auth sessions.
I created a new
getCashuWalletWithAuthutility that wrapsgetCashuWalletand passes in our auth token getters.Then, everywhere that might need auth I replaced getCashuWallet with the auth one.
I then have a modal that I trigger whenever I detect we need to authenticate and this will pop up to confirm with the user before redirection... QUESTION: should we just make our getters trigger the prompt to ask the user if they want to authenticate so that we don't have to check if auth is required then manually ask the user everytime?
TODO