Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs(snippets): add bash example for third party Oauth (#22277)

F-G Fernandez8cb4c0337af2
diff --git a/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx b/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx
index a1006a97540..9cbf5f4ac2d 100644
--- a/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx
+++ b/apps/studio/components/interfaces/Docs/Pages/UserManagement.tsx
@@ -216,7 +216,10 @@ export default function UserManagement({
</p>
</article>
<article className="code">
- <CodeSnippet selectedLang={selectedLang} snippet={Snippets.authThirdPartyLogin()} />
+ <CodeSnippet
+ selectedLang={selectedLang}
+ snippet={Snippets.authThirdPartyLogin(autoApiService.endpoint, keyToShow)}
+ />
</article>
</div>
diff --git a/apps/studio/components/interfaces/Docs/Snippets.ts b/apps/studio/components/interfaces/Docs/Snippets.ts
index 93f23714aa3..de2792c4692 100644
--- a/apps/studio/components/interfaces/Docs/Snippets.ts
+++ b/apps/studio/components/interfaces/Docs/Snippets.ts
@@ -651,11 +651,16 @@ let { data, error } = await supabase.auth.admin.inviteUserByEmail('someone@email
`,
},
}),
- authThirdPartyLogin: () => ({
+ authThirdPartyLogin: (endpoint: string, apiKey: string) => ({
title: 'Third Party Login',
bash: {
language: 'bash',
- code: ``,
+ code: `
+curl -X GET '${endpoint}/auth/v1/authorize?provider=github' \\
+-H "apikey: ${apiKey}" \\
+-H "Authorization: Bearer USER_TOKEN" \\
+-H "Content-Type: application/json"
+`,
},
js: {
language: 'js',