website/docs: Update flow to run only during Github logins (#2959)
This commit is contained in:
parent
2b68363452
commit
5f04a187ea
|
@ -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
|
||||
|
|
Reference in New Issue