mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## TL;DR fixes the Auth Users provider badge for Web3 users so it reflects the actual enabled provider state ## problem Web3 authenticated users appeared `Disabled` in `Authentication -> Users -> Provider Information` This happened because the user provider is stored as `web3`, while the actual enabled state is chain specific (`solana` / `ethereum`) <p align="left"> <img width="443" height="281" alt="Image" src="https://github.com/user-attachments/assets/4918cbdb-75a4-4bd9-b9e5-511dcced5447" /> </p> ## solution When the provider is `web3`, resolve the enabled badge from `raw_user_meta_data.custom_claims.chain` (saw that in the payload while testing) and map it to the correct Web3 config flag: - `solana` -> `EXTERNAL_WEB3_SOLANA_ENABLED` - `ethereum` -> `EXTERNAL_WEB3_ETHEREUM_ENABLED` <p align="left"> <img width="148" height="43" alt="image" src="https://github.com/user-attachments/assets/9d21b8fc-da93-4dcd-9cdb-5c0eacef2a27" /> </p> ## ref: - closes https://github.com/supabase/supabase/issues/44724 - closes https://github.com/supabase/supabase/issues/39568 - closes https://github.com/orgs/supabase/discussions/39563 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Corrected web3 provider enabled status detection by mapping user chain configuration to provider settings. * **Tests** * Added test coverage for web3 user enabled status display. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly
const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}
export default ComponentA