나는 새로운 Oauth 공급자를 위해 Laravel Socialiste을 확장하고 권한 부여 URL을 변경하는 간단한 문제에 어려움을 겪고 있습니다.재정의 Laravel RedirectResponse
RedirectResponse
에 의해 생성 된 URL은 범위의 구분을 위해, 예를 들어, %2C
대신 +
, https://mycustomerprovider.com/oauth/authorize?scope=blah%2Cblahagain을 가지고 있으며, 따라서이 예 mycustomprovider
에서 내가 사용하고 특정 공급자와 함께 실패합니다.
누구나 %2C
을 +
으로 변경하는 권한 부여 url을 수정하는 방법을 알고 계십니까?
return Socialite::driver('mycustomprovider')->redirect();
당신 var_dump(Socialite::driver('mycustomprovider')->redirect())
경우, 여기에 포함 된 내용은 다음과 같습니다
RedirectResponse {#886 ▼
#targetUrl: "http://"
+headers: ResponseHeaderBag {#888 ▶}
#content: """
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta charset="UTF-8" />\n
<meta http-equiv="refresh" content="1;url=https://mycustomerprovider.com/oauth/authorize?scope=blah%2Cblahagain" />\n
\n
<title>Redirecting to https://mycustomerprovider.com/oauth/authorize?scope=blah%2Cblahagain</title>\n
</head>\n
<body>\n
Redirecting to <a href="https://mycustomerprovider.com/oauth/authorize?scope=blah%2Cblahagain</a>.\n
</body>\n
</html>
"""
#version: "1.0"
#statusCode: 302
#statusText: "Found"
#charset: null
}