mirror of
https://github.com/supabase/supabase.git
synced 2026-09-06 18:11:51 +08:00
Follow-up to #48344: collapses the two resolution paths for the Admonition module into one. `src/admonition.tsx` was a back-compat shim re-exporting `src/Admonition/`. Two ways to resolve one module is exactly what produced the macOS self-import bug fixed in #48344, and the local typecheck errors that #48374 worked around. This removes the shim and standardizes on the PascalCase subpath, matching every other export in the package. **Changed:** - Codemodded all 246 `ui-patterns/admonition` imports to `ui-patterns/Admonition` (240 `.tsx`, 5 `.mdx`, 1 `.ts` across studio, docs, www, design-system, and lite-studio) - Pointed the 5 internal `'../admonition'` imports back at the `'../Admonition'` directory **Removed:** - `packages/ui-patterns/src/admonition.tsx`, and its `./admonition` entry in the exports map (regenerated with `pnpm gen:exports`) ## To test - `grep -r "ui-patterns/admonition" --include='*.ts*'` → no hits - `pnpm test:case-hazards` → passes - `pnpm typecheck` → all 15 tasks green - `pnpm --filter studio run lint:ratchet` → passes - `pnpm --filter ui-patterns vitest run src/Admonition` → 11 tests pass <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Standardized Admonition component imports across the application and documentation. * Improved compatibility with case-sensitive environments by using the canonical component path. * Removed the legacy Admonition import entry point. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Alaister Young <10985857+alaister@users.noreply.github.com>
53 lines
2.5 KiB
Plaintext
53 lines
2.5 KiB
Plaintext
import { Admonition } from 'ui-patterns/Admonition'
|
|
|
|
<Admonition type="warning">
|
|
|
|
The MessageBird provider only works with the APIs before the [transition to Bird](https://bird.com/blog/messagebird-is-now-bird). If you are using a new Bird account, this provider will not work properly since it relies on using the old set of [MessageBird APIs](https://developers.messagebird.com/api/sms-messaging/).
|
|
|
|
</Admonition>
|
|
|
|
## Prerequisites
|
|
|
|
You'll need:
|
|
|
|
- A MessageBird account (sign up [here](https://dashboard.messagebird.com/en/sign-up))
|
|
- A Supabase project (create one [here](https://supabase.com/dashboard))
|
|
- A mobile phone capable of receiving SMS
|
|
|
|
## Set up MessageBird as your SMS provider
|
|
|
|
Start by logging into your MessageBird account and verify the mobile number you'll be using to test with [here](https://dashboard.messagebird.com/en/getting-started/sms). This is the number that will be receiving the SMS OTPs.
|
|
|
|

|
|
|
|

|
|
|
|
Navigate to the [dashboard settings](https://dashboard.messagebird.com/en/settings/sms) to set the default originator. The messagebird originator is the name or number from which the message is sent. For more information, you can refer to the messagebird article on choosing an originator [here](https://support.messagebird.com/hc/en-us/articles/115002628665-Choosing-an-originator)
|
|
|
|

|
|
|
|
You will need the following values to get started:
|
|
|
|
- Live API Key / Test API Key
|
|
- MessageBird originator
|
|
|
|
Now go to the [Auth > Providers](https://supabase.com/dashboard/project/_/auth/providers) page in the Supabase dashboard and select "Phone" from the Auth Providers list.
|
|
|
|
You should see an option to enable the Phone provider.
|
|
|
|
Toggle it on, and copy the 2 values over from the Messagebird dashboard. Click save.
|
|
|
|
<Admonition>
|
|
|
|
If you use the Test API Key, the OTP will not be delivered to the mobile number specified but messagebird will log the response in the dashboard. If the Live API Key is used instead, the OTP will be delivered and there will be a deduction in your free credits.
|
|
|
|
</Admonition>
|
|
|
|
#### SMS custom template
|
|
|
|
The SMS message sent to a phone containing an OTP code can be customized. This is useful if you need to mention a brand name or display a website address.
|
|
|
|
Go to [Auth > Templates](https://supabase.com/dashboard/project/_/auth/templates) page in the Supabase dashboard.
|
|
|
|
Use the variable `.Code` in the template to display the code.
|