I'm trying to add intagram login on my hotspot page, however I need some query string data when user is redirected back to my page
I'm using league/oauth2-instagram package After I authorize instagram api, I'm redirected back to my page but only with state and code, the query string passed on redirect_uri are wipped out
What am I doing wrong? When I try at the second time after logged in and authorized, I get redirected with full URL params
Note: This auth flow is beeing used on CNA (Captive Portal)
This is the URL after authorization
/hotspot/sociallogin?code=f74d925d93b04887b81bfa8e351bce0d
state=342013854629631bdd8dcd252dc0bd0c
This is URL to redirect user to authorize API
https://api.instagram.com/oauth/authorize?state=854c56e92ead4e6f3738e6bc87185a65
scope=basic
response_type=code
approval_prompt=auto
redirect_uri=https%3A%2F%2Fmyurl-example.net%2Fhotspot%2Fsociallogin%3Flogintype%3Dinstagram%26permalink%3Dmypermalink%26ip%3DUSERIP%26mac%3DMACADDRESS%26linkloginonly%3D%26chapchallenge%3D%26chapid%3D%26client_id%3DMY_CLIENT_ID
This is what I want after authorize Instagram API :
https://myurl-example.net/hotspot/sociallogin?logintype=instagram&permalink=mypermalink&ip=USERIP&mac=MACADDRESS&linkloginonly=&chapchallenge=&chapid=&client_id=MY_CLIENT_ID