security - How do I send query params in oauth call back URL? -


when http request 'r' query parameter 'q', need oidc (code grant flow) request , upon successful authentication need redirect uri query parameter 'q' represents.

when send oidc request "redirect_uri=http://localhost/oauth/callback?q=v", google gives 400 error because had registered callback 'http://localhost/oauth/callback'.

i can think of 2 approaches solve issue

  1. encode query parameter key value q=v (as json base64 encoding) , send part of state parameter.
  2. send q=v httponly cookie.

i prefer approach 2.is there potential issue approach 2? if yes, approach 1 safe?


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -