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=Marki 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
stateparameter, as documented here: https://fusionauth.io/docs/v1/tech/oauth/endpoints#authorization-code-grant-requestHere's a video showing how to use
stateto 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login