# Auth0.swift, facebook login, 'Sorry, something went wrong'

**URL:** <https://community.auth0.com/t/auth0-swift-facebook-login-sorry-something-went-wrong/9299>\
**Category:** Get Help\
**Tags:** facebook, swift, login\
**Created:** [January 25, 2018, 8:05pm UTC](https://community.auth0.com/t/auth0-swift-facebook-login-sorry-something-went-wrong/9299 "2018-01-25T20:05:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sean.lintern88](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@sean.lintern88](https://community.auth0.com/u/sean.lintern88)\
**Post date:** [January 25, 2018, 8:05pm UTC](https://community.auth0.com/t/auth0-swift-facebook-login-sorry-something-went-wrong/9299/1 "2018-01-25T20:05:00Z")

</div>

Attempting to Facebook login via the webAuth(), just making sure this is a current facebook issue (seems unlikely?) Auth0.webAuth().connection(“facebook”).connectionScope(AuthorizationCoordinator.auth0DBConnection).start { (result) in Logger.log(result, .warning) } ![alt text][1] [1]: /storage/temp/813-screen-shot-2018-01-25-at-120406.png Thanks.

---

<div class="post-metadata">

**Author:** ![sean.lintern88](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@sean.lintern88](https://community.auth0.com/u/sean.lintern88)\
**Post date:** [January 25, 2018, 9:24pm UTC](https://community.auth0.com/t/auth0-swift-facebook-login-sorry-something-went-wrong/9299/2 "2018-01-25T21:24:55Z")

</div>

Seems the issue was for some reason, adding a connectionScope would cause the facebook error

---

<div class="post-metadata">

**Author:** ![ricardo.batista](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ricardo.batista/32/7711_2.png) [@ricardo.batista](https://community.auth0.com/u/ricardo.batista)\
**Post date:** [February 7, 2018, 7:01pm UTC](https://community.auth0.com/t/auth0-swift-facebook-login-sorry-something-went-wrong/9299/3 "2018-02-07T19:01:56Z")

</div>

The connectionScope allows you to set provider scopes for oauth2/social connections with a comma separated list. In the [Auth0.swift repository] ([Auth0.swift/WebAuth.swift at 931883ba3ac3a48d49152cd83a31badad957e3a5 · auth0/Auth0.swift · GitHub](https://github.com/auth0/Auth0.swift/blob/931883ba3ac3a48d49152cd83a31badad957e3a5/Auth0/WebAuth.swift#L120-L127)) it states: `connectionScope: oauth2/social comma separated scope list: 'user_friends,email'`

Just as an example, you can see more info about the facebook permissions scopes here: [Permissions Reference - Graph API - Documentation - Meta for Developers](https://developers.facebook.com/docs/facebook-login/permissions/)

So this code should work with the latest Auth0.swift library:

```
Auth0.webAuth().connection("facebook")
    .connectionScope("public_profile,email")
    .start { (result) in
        switch(result) {
        case .success(let credentials):
            (...)
         case .failure(let error):
             (...)
          }
    }

```

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 25, 2019, 9:56am UTC](https://community.auth0.com/t/auth0-swift-facebook-login-sorry-something-went-wrong/9299/4 "2019-07-25T09:56:31Z")

</div>


