diff --git a/authlib/oauth2/rfc7523/assertion.py b/authlib/oauth2/rfc7523/assertion.py index 95c47e02..8ca41095 100644 --- a/authlib/oauth2/rfc7523/assertion.py +++ b/authlib/oauth2/rfc7523/assertion.py @@ -5,10 +5,11 @@ def sign_jwt_bearer_assertion( key, issuer, audience, subject=None, issued_at=None, - expires_at=None, alg=None, header=None, claims=None, **kwargs): + expires_at=None, claims=None, header=None, **kwargs): if header is None: header = {} + alg = kwargs.pop('alg', None) if alg is not None: header['alg'] = alg if 'alg' not in header: