You should probably check the context's identity rather than by key. Something like ``isinstance(context, GoogleAuthenticationComplete)`` where GoogleAuthenticationComplete comes from the provider declaration.

Ideally this would be an adaptation lookup which would remove any need for a rather long series of if conditions (one for each provider).