I’ve noticed there is a doc for facebook
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/?locale=en_US#logindialog
“redirect_uri” must be one fix point to add to trusted
“state” can vary by need, and will returnd as-is
https://www.facebook.com/v2.12/dialog/oauth?
client_id={app-id}
&redirect_uri={“https://www.domain.com/login”}
&state={“{st=state123abc,ds=123456789}”}
will be returnd as
https://www.domain.com/login?state=”{st=state123abc,ds=123456789}”
Please consider fix the redirect to same page function, as it was so good ??