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

Commit 41a8e9c

Browse files
committed
Might not have an ID Token.
Changed name to reflect reality.
1 parent d334f73 commit 41a8e9c

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

example/flask_rp/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@ def repost_fragment():
185185
return finalize(op_identifier, args)
186186

187187

188-
@oidc_rp_views.route('/ihf_cb')
189-
def ihf_cb(self, op_identifier='', **kwargs):
188+
@oidc_rp_views.route('/authz_im_cb')
189+
def authz_im_cb(op_identifier='', **kwargs):
190190
logger.debug('implicit_hybrid_flow kwargs: {}'.format(kwargs))
191-
return render_template('repost_fragment.html')
191+
return render_template('repost_fragment.html', op_identifier=op_identifier)
192192

193193

194194
@oidc_rp_views.route('/session_iframe')

src/oidcrp/rp_handler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,10 @@ def finalize(self, issuer, response, behaviour_args: Optional[dict] = None):
813813
else:
814814
_context.state.store_sid2state(sid, _state)
815815

816-
_context.state.store_sub2state(_id_token['sub'], _state)
816+
if _id_token:
817+
_context.state.store_sub2state(_id_token['sub'], _state)
818+
else:
819+
_context.state.store_sub2state(inforesp['sub'], _state)
817820

818821
return {
819822
'userinfo': inforesp,

0 commit comments

Comments
 (0)