auth: Include user_id in the params returned at the end of mobile flow.

The user id is a very useful piece of information that the mobile
client should have access to - instead of only getting the email. This
makes it much simpler to impleent clients that might be robust to
changes in email address.
This commit is contained in:
Mateusz Mandera
2021-11-16 16:04:04 +01:00
committed by Tim Abbott
parent 9e979e9e66
commit 0abbb87155
4 changed files with 15 additions and 3 deletions

View File

@@ -382,6 +382,7 @@ def create_response_for_otp_flow(
params = {
encrypted_key_field_name: otp_encrypt_api_key(key, otp),
"email": user_profile.delivery_email,
"user_id": user_profile.id,
"realm": realm_uri,
}
# We can't use HttpResponseRedirect, since it only allows HTTP(S) URLs