6

I have been trying to use the oauth2 playground with the Laravel oauth2-server bundle and ran into an issue. I'm using header('location: to take me back to google after the authorization has happened. The string I'm putting into the redirect is

https://developers.google.com/oauthplayground/?state=1&code=d84024740acc22646b9636421406c88abeab9c8e 

However, when I get to it the & has been replaced with & which is causing the playground to not go to step 2. What is going on?

Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
bretterer
  • 5,693
  • 5
  • 32
  • 53

1 Answers1

3

Have you tried using Laravel's Redirect class, rather than a header? It should handle the encoding better:

Redirect::to('https://developers.google.com/oauthplayground/?state=1&code=d84024740acc22646b9636421406c88abeab9c8e');
Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
Dan Matthews
  • 1,245
  • 2
  • 12
  • 24