Tenant admin
What an app builder does with the management API, on the demo’s own tenant. The server reads it with a read-only org API key that never reaches your browser, so nothing here can be changed.
| Provider | On | Signs in through | Redirect URI |
|---|---|---|---|
| Yes | Synq’s app | https://showcase.auth.synq.build/federation/google/callback | |
| github | Yes | Synq’s app | https://showcase.auth.synq.build/federation/github/callback |
| microsoft | Yes | Synq’s app | https://showcase.auth.synq.build/federation/microsoft/callback |
| apple | Yes | Synq’s app | https://showcase.auth.synq.build/federation/apple/callback |
| Yes | Synq’s app | https://showcase.auth.synq.build/federation/facebook/callback | |
| x | Yes | Synq’s app | https://showcase.auth.synq.build/federation/x/callback |
| discord | Yes | Synq’s app | https://showcase.auth.synq.build/federation/discord/callback |
| telegram | Yes | Synq’s app | https://showcase.auth.synq.build/federation/telegram/callback |
| matrica | No | No app yet | https://showcase.auth.synq.build/federation/matrica/callback |
src/examples/admin/Connections.tsximport { demoOrg } from '../../lib/management'
// The brand's sign-in providers, read on the server through the management
// API with an org API key: each provider, whether it's on, and whose app at
// the provider it signs in through (Synq's own, or the brand's or the org's
// own app, which they bring with their credentials: bring-your-own
// connections), or none yet.
/** Whose app a provider signs in through (`signs_in_through`), in words. */
const THROUGH: Record<string, string> = {
synq: 'Synq’s app',
brand: 'The brand’s own app',
org: 'The org’s own app',
}
export async function Connections() {
const tenant = await demoOrg()
if (!tenant) return <p>The demo tenant isn’t set up.</p>
// A list answers a page at a time: paginate reads every page.
const data = []
for await (const provider of tenant.synq.paginate(
'/v1/orgs/{org}/brands/{brand}/sign-in-providers',
{ path: tenant.path },
)) {
data.push(provider)
}
return (
<table className="w-full text-left">
<thead>
<tr>
<th>Provider</th>
<th>On</th>
<th>Signs in through</th>
<th>Redirect URI</th>
</tr>
</thead>
<tbody>
{data.map((p) => (
<tr key={p.provider}>
<td>{p.provider}</td>
<td>{p.offered ? 'Yes' : 'No'}</td>
<td>
{p.signs_in_through === null
? 'No app yet'
: (THROUGH[p.signs_in_through] ?? p.signs_in_through)}
</td>
<td>
<code>{p.redirect_uri}</code>
</td>
</tr>
))}
</tbody>
</table>
)
}