My pipline is below
PIPELINE = (
'social.pipeline.social_auth.social_details',
'social.pipeline.social_auth.social_uid',
'social.pipeline.social_auth.auth_allowed',
'social.pipeline.social_auth.social_user',
'create_user_and_set_email_as_username',
'social.pipeline.social_auth.associate_by_email',
'social.pipeline.social_auth.associate_user',
'social.pipeline.social_auth.load_extra_data',
'social.pipeline.user.user_details',
)
The create_user_and_set_email_as_username
is the function I built to do some extra things to the user. It's come to the stage where in that function I want to be able to kick out users who aren't using a particular oauth client. (We have some corporate customers who want to force their employees to use azure oauth2).
I can't figure out how to access the currently used backend in that function. IE what the person just clicked and what service they're trying to use. Tried pdb'ing and looking at the components of strategy but couldn't see anything useful there.
Am I even trying to do this in the right place?
How do I access what backend they're trying to use. Tried strategy.get_backends() but that the lists possible not the current one.