Skip to content
This repository was archived by the owner on Jun 12, 2021. It is now read-only.

Commit efdcda1

Browse files
committed
Authorization offline_access needs prompt
1 parent c58e605 commit efdcda1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/oidcservice/oidc/authorization.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,15 @@ def oidc_pre_construct(self, request_args=None, **kwargs):
104104
return request_args, post_args
105105

106106
def oidc_post_construct(self, req, **kwargs):
107-
108107
if 'openid' in req['scope']:
109108
_response_type = req['response_type'][0]
110109
if 'id_token' in _response_type or 'code' in _response_type:
111110
self.store_nonce2state(req['nonce'], req['state'])
112111

112+
if 'offline_access' in req['scope']:
113+
if 'prompt' not in req:
114+
req['prompt'] = 'consent'
115+
113116
try:
114117
_request_method = kwargs['request_param']
115118
except KeyError:

0 commit comments

Comments
 (0)