From d4b8e8d8aeb8ff649f8b02ce163fe8bc0f6dd156 Mon Sep 17 00:00:00 2001 From: Mikel Larreategi Date: Fri, 15 Mar 2024 22:59:04 +0100 Subject: [PATCH] more Apple weirdness --- src/pas/plugins/oidc/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pas/plugins/oidc/utils.py b/src/pas/plugins/oidc/utils.py index 07d382a..e306d81 100644 --- a/src/pas/plugins/oidc/utils.py +++ b/src/pas/plugins/oidc/utils.py @@ -186,6 +186,11 @@ def get_user_info(client, state, args) -> Union[message.OpenIDSchema, dict]: allowed_authn_method = "client_secret_post" elif "client_secret_basic" in allowed_authn_methods: allowed_authn_method = "client_secret_basic" + elif allowed_authn_methods and isinstance(allowed_authn_methods, str): + # Yay, Apple returns a string in the allowed_authn_methods + # We may face the same in some other providers, so we keep it + # as we receive it + allowed_authn_method = allowed_authn_methods resp = client.do_access_token_request( state=state, request_args=args, authn_method=allowed_authn_method