0

I want to give social signup and registration for multiple users. Multiple types (roles) of user can sign up. That means I want a different registration page for each of them. Now, if I give them to sign up via Google option, how do I identify at the controller which role to assign to the new user? Basically, how do I identify which registration page was used before to sign up via Google?

I have tried using request()->server('HTTP_REFERER') but it returns Google's URL instead of my registration page.

Vaibhav Rathore
  • 301
  • 2
  • 10

1 Answers1

0

When the user is on your registration page (before going to the social provider's login) you can store something in the session or in the browser's localStorage.

When the return comes back from the social provider's login you can retrieve the session or localStorage data and use that.

Andrew McCombe
  • 1,603
  • 1
  • 12
  • 13