website/docs: Update flow to run only during Github logins (#2959)
This commit is contained in:
		| @ -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: | To check if the user is member of an organisation, you can use the following policy on your flows: | ||||||
|  |  | ||||||
| ```python | ```python | ||||||
|  | # Ensure flow is only run during oauth logins via Github | ||||||
|  | if context['source'].provider_type != "github": | ||||||
|  |     return True | ||||||
|  |  | ||||||
| accepted_org = "foo" | accepted_org = "foo" | ||||||
|  |  | ||||||
| # Get the user-source connection object from the context, and get the access token | # Get the user-source connection object from the context, and get the access token | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 TheMythologist
					TheMythologist