You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the first login to Facebook the redirect URL contains "fragment" _=_
For example com.auth0.akswiftauth0test://juliazhelem.eu.auth0.com/ios/com.auth0.AKSwiftAuth0Test/callback?code=pMmrjQQO7EAQGJmt&state=pg76m1ep6TD0RwYzwrlszuh7bpXjwIBmaxW_NWacZCM#_=_
Auth0.swift analyzes this URL and marks it as “not completed” (Auth0.resumeAuth(url, options: options) returns "false")
For the next logins to Facebook the redirect URL does not contain any fragments and everything works fine
Only with the first login, I mean if you did not login to Facebook on your device before.
In this case URL contains #_=_ and Auth0.resumeAuth(url, options: options) returns "false" (https://github.com/auth0/Auth0.swift/blob/master/Auth0/OAuth2Session.swift#L87) because items are a0_fragmentValues (_, _). But the URL is correct, it contains all necessary information (state, code) in NSURL.query
Also I checked "twitter", "google-oauth2", "linkedin". State and code are in NSURL.query, for these connections URL does not contain NSURL.fragment at all.
At the first login to Facebook the redirect URL contains "fragment"
_=_
For example
com.auth0.akswiftauth0test://juliazhelem.eu.auth0.com/ios/com.auth0.AKSwiftAuth0Test/callback?code=pMmrjQQO7EAQGJmt&state=pg76m1ep6TD0RwYzwrlszuh7bpXjwIBmaxW_NWacZCM#_=_
Auth0.swift analyzes this URL and marks it as “not completed” (Auth0.resumeAuth(url, options: options) returns "false")
For the next logins to Facebook the redirect URL does not contain any fragments and everything works fine
Possible solution:
Function SafariSession.resume(...) does not check "fragment", only "query".
So changing
let items = components.a0_values
tolet items = components.a0_queryValues
in file https://github.com/auth0/Auth0.swift/blob/master/Auth0/OAuth2Session.swift#L86 might fix the issueThe text was updated successfully, but these errors were encountered: