Skip to content

Commit f4ac83c

Browse files
committed
Fixed jaliss#604: Facebook oauth token format change causes error
1 parent d6310aa commit f4ac83c

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

ChangeLog

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
3.0-M8 - 2017-03-28
2+
- Fixed #604: Facebook oauth token format change causes error
13
3.0-M7 - 2017-03-10
24
- Recover to None if an authenticator builder fails
35
- Fixed #601: Security: password reset email host injection

module-code/app/securesocial/core/providers/FacebookProvider.scala

-11
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,6 @@ class FacebookProvider(
4949

5050
override val id = FacebookProvider.Facebook
5151

52-
// facebook does not follow the OAuth2 spec :-\
53-
override protected def buildInfo(response: WSResponse): OAuth2Info = {
54-
response.body.split("&|=") match {
55-
case Array(AccessToken, token, Expires, expiresIn) => OAuth2Info(token, None, Some(expiresIn.toInt))
56-
case Array(AccessToken, token) => OAuth2Info(token)
57-
case _ =>
58-
logger.error("[securesocial] invalid response format for accessToken")
59-
throw new AuthenticationException()
60-
}
61-
}
62-
6352
def fillProfile(info: OAuth2Info): Future[BasicProfile] = {
6453
val accessToken = info.accessToken
6554
client.retrieveProfile(MeApi + accessToken).map { me =>

0 commit comments

Comments
 (0)