我一直在尝试将 oauth2 操场与 Laravel oauth2-server
捆绑包一起使用,但遇到了一个问题。 授权发生后,我正在使用header('location:
将我带回谷歌。 我放入重定向的字符串是
https://developers.google.com/oauthplayground/?state=1&code=d84024740acc22646b9636421406c88abeab9c8e
但是,当我到达它时,&
已被替换为&
这导致操场无法进入第 2 步。 这是怎么回事?
您是否尝试过使用 Laravel 的 Redirect
类,而不是标头?它应该更好地处理编码:
Redirect::to('https://developers.google.com/oauthplayground/?state=1&code=d84024740acc22646b9636421406c88abeab9c8e');