From 5f04a187eab1b27fc382b87958ae1e8b75668b53 Mon Sep 17 00:00:00 2001 From: TheMythologist Date: Fri, 27 May 2022 22:07:33 +0800 Subject: [PATCH] website/docs: Update flow to run only during Github logins (#2959) --- website/integrations/sources/github/index.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/integrations/sources/github/index.md b/website/integrations/sources/github/index.md index a8c797cb3..80d8f8085 100644 --- a/website/integrations/sources/github/index.md +++ b/website/integrations/sources/github/index.md @@ -57,6 +57,10 @@ Requires authentik 2021.12.5. To check if the user is member of an organisation, you can use the following policy on your flows: ```python +# Ensure flow is only run during oauth logins via Github +if context['source'].provider_type != "github": + return True + accepted_org = "foo" # Get the user-source connection object from the context, and get the access token