sources/oauth: fix facebook provider

This commit is contained in:
Jens Langhammer
2020-06-25 10:24:53 +02:00
parent 9eaceb9ec6
commit 57a7bed99d
6 changed files with 42 additions and 9 deletions

View File

@ -7,10 +7,12 @@ from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from passbook.flows.models import FlowDesignation
from passbook.stages.prompt.models import FieldTypes
FLOW_POLICY_EXPRESSION = """return pb_is_sso_flow"""
PROMPT_POLICY_EXPRESSION = (
"""return 'username' in pb_flow_plan.context['prompt_data']"""
)
FLOW_POLICY_EXPRESSION = """# This policy ensures that this flow can only be used when the user
# is in a SSO Flow (meaning they come from an external IdP)
return pb_is_sso_flow"""
PROMPT_POLICY_EXPRESSION = """# Check if we've been given a username by the external IdP
# and trigger the enrollment flow
return 'username' in pb_flow_plan.context.get('prompt_data', {})"""
def create_default_source_enrollment_flow(