Skip to content

Commit

Permalink
Merge pull request #416 from lozeone/v3.x
Browse files Browse the repository at this point in the history
Handle facebook login page redirects in v3.x
  • Loading branch information
oscarotero committed Dec 15, 2020
2 parents 01c284d + bf4b908 commit f4ce26e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/Http/Redirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ abstract class Redirects
'hashBang' => '*#!*',
'spotify' => 'play.spotify.com/*',
'tumblr' => 't.umblr.com/redirect',
'facebook' => 'www.facebook.com/login/*',
];

/**
Expand All @@ -33,6 +34,23 @@ public static function resolve(Url $url)
return $url;
}

/**
* Resolve a facebook redirection url.
*
* @param Url $url
*
* @return Url
*/
public static function facebook(Url $url)
{
if (($value = $url->getQueryParameter('next'))) {
return Url::create($value);
}

return $url;
}


/**
* Resolve a google redirection url.
*
Expand Down

0 comments on commit f4ce26e

Please sign in to comment.