From 2aac23841732cb772d321da622691b1d3f01dd14 Mon Sep 17 00:00:00 2001 From: jamesread Date: Mon, 2 Dec 2024 10:56:03 +0000 Subject: [PATCH] Move OAuth2 redirect intructions to generic snippet --- components/snippets/oauth2redirect.mdx | 8 ++++++++ pages/providers/discord.mdx | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 components/snippets/oauth2redirect.mdx diff --git a/components/snippets/oauth2redirect.mdx b/components/snippets/oauth2redirect.mdx new file mode 100644 index 0000000..60d3f16 --- /dev/null +++ b/components/snippets/oauth2redirect.mdx @@ -0,0 +1,8 @@ +The OAuth2 Redirect URI is the location where the provider will redirect to after trying to login. This needs to set to your Postiz `FRONTEND_URL` + `/integrations/social/` + `providername`. + +* eg: If your Postiz URL is: `https://postiz.example.com`, then your OAuth2 Redirect URI is `https://postiz.example.com/integrations/social/`. +* eg: If your Postiz URL is `https://localhost:5000`, then your OAuth2 Redirect URI is `https://localhost:5000/integrations/social/providername`. + +You only need to set one OAuth2 Redirect URI when you are setting up your Postiz app. + +{{ provider }} diff --git a/pages/providers/discord.mdx b/pages/providers/discord.mdx index 0f1d6c5..fde6341 100644 --- a/pages/providers/discord.mdx +++ b/pages/providers/discord.mdx @@ -4,6 +4,7 @@ description: How to add discord to your system --- import {Steps, Callout} from "nextra/components"; +import OAuth2Redirect from "../../components/snippets/oauth2redirect.mdx"; This integration requires that you have **Manage Server** permissions on the Discord server you want to integrate with. @@ -29,6 +30,8 @@ DISCORD_CLIENT_SECRET="your_client_secret" ### Add a Redirect URI + + The redirect URI is the URL that Discord will redirect to after you have logged in. Assuming you are running Postiz on `postiz.example.com`, this would be: `https://postiz.example.com/integrations/social/discord`. Alternatively if you are running on `localhost:4200`, this would be `http://localhost:4200/integrations/social/discord`. You only really need one of these, depending on where you are running Postiz. You can find this in the **OAuth2** section of the Discord Developer Portal.