jumbojett / OpenID-Connect-PHP

Minimalist OpenID Connect client
https://github.com/jumbojett/OpenID-Connect-PHP
Apache License 2.0
607 stars 363 forks source link

Custom param #367

Closed phpSimplex closed 1 year ago

phpSimplex commented 1 year ago

Is there a possibility to add a custom param that will be send back when redirecting? I tried in setRedirectUrl("url/.com/login?customCode=XXX") but that didnt work and got me the error 'Invalid Redirect Uri'

ricklambrechts commented 1 year ago

This is not possible within the openid specification. What you could do is set a value in the session.

phpSimplex commented 1 year ago

Well the problem is that the session changes when the redirect happen so i have a different session_id. The idea was to send the session_id within the redirect uri to reset the session with the old id

DeepDiver1975 commented 1 year ago

if the session id changes this reads more like an issue in your same site cookie setup - refs https://web.dev/samesite-cookies-explained/