Auth0 Home Blog Docs

PHP SDK: How to pass a referrer with login() method

Hi all,

I am using the PHP SDK to authorize users with the login() method. A redirect_uri is defined in Dashboard and also provided in the Auth0() object initialization. What I need is an additional (GET) parameter like “referrer” (Otherwise I would have to define multiple redirect_uris in Dashboard) so that I can redirect the user to a specific subpage after successfull login. So the parameter should be appended to the auth0 login url and after successfull login it shuld be appended to the redirect_uri.
Is that possible?

Thanks in Advanced
Matthias

Hey there @derMatze and welcome to the Auth0 Community!

Can you explain a little more about your desired end result/use case? I just want to make sure we understand what your overall goal is. Thanks!

Hi James,

I managed it myself, using the state parameter for custom redirect after successful login.

Thank you

I’m glad to hear you got it handled! Please keep us posted if you have any questions in the future we can assist with :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.