AuthMissingParameter caused by cleaning up the wrong Partial
Expected behaviour
When there are multiple partial functions in the pipeline, the pipeline should seamlessly save the partial_token on the session without requiring the partial_token to be passed around on every request to the /complete/<backend> endpoint.
Actual behaviour
The clean up process of the partial_token removes the previous token from the database but removes the current partial_token because it doesn't check which token is saved on the session. The partial_token for the current partial is saved before the cleanup of the old token happens.
What are the steps to reproduce this issue?
-
Check out this branch of the social-examples repo.
-
Add the
SOCIAL_AUTH_GOOGLE_OAUTH2_KEYandSOCIAL_AUTH_GOOGLE_OAUTH2_SECRETtoexample-django/example/settings.py. This branch edits thehome.htmltemplate so it does not pass up thepartial_tokento thecomplete/<backend>endpoint. -
Connect a non-work Google Account (I think this is necessary to be prompted for Country and City)
-
It should redirect the user and ask for Country. Fill this in.
-
It should redirect the user and ask for City. Fill this in.
-
AuthMissingParametererror happens.
I added lots more context for this issue in my PR here.