FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    php example with passing of an initial parameter

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 3 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mark 1
      last edited by

      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.

      danD 1 Reply Last reply
      Reply Quote 0
      • danD
        dan @mark 1
        last edited by

        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-request

        Here's a video showing how to use state to deeplink into an application.

        Hope this helps!

        --
        FusionAuth - Identity Without Constraints
        https://fusionauth.io

        1 Reply Last reply
        Reply Quote 0
        • H
          hashirshabbir219
          last edited by

          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.

          1 Reply Last reply
          Reply Quote 0

          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
          • First post
            Last post