php example with passing of an initial parameter
-
hello - first time poster. i have not done ANYTHING with FusionAuth yet.
before i start i was looking at this php example which looks straightforward enough.
one point critical for my applications is to be able to pass an initial parm through the oauth source & have it returned to me on successful login. it was extremely difficult to do this on Auth0, and i ended up hiring a consultant to figure it out. YES it turned out to have an easy solution, but i was surprised that Auth0 didnt provide an example (or assist)
so in other words, if i had something like
?parmOne=Mark
i should think this could be relatively easily returned to me once login is successful.are there any working examples of something like this?
note: total newbies REALLY appreciate the absolute most simple working example possible!
thank you.
-
hiya @mark-1
Welcome to FusionAuth!
Re: simple example, you might want to take a look at our quickstarts: https://fusionauth.io/docs/quickstarts/ though we don't have a plain PHP one.
You want to use the
state
parameter, as documented here: https://fusionauth.io/docs/v1/tech/oauth/endpoints#authorization-code-grant-requestHere's a video showing how to use
state
to deeplink into an application.Hope this helps!
-
In PHP with FusionAuth, you can pass an initial parameter through the OAuth source and have it returned on successful login. While there may not be a specific example tailored to your exact use case, you can include your parameter in the OAuth request URL like "?parmOne=Mark," and FusionAuth should be able to return it to you upon a successful login.
FusionAuth provides a flexible system for handling OAuth parameters, and you can adapt the PHP example you mentioned to suit your needs. For a beginner-friendly example, you can start with the basic PHP integration and customize it to include your desired parameters.