mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #250] App doesn't seem to callback after authentication #142
Labels
No labels
bug
cocoapod
duplicate
enhancement
feature-request
help wanted
help wanted
invalid
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OAuthSwift#142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tunds on GitHub (Jul 8, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/250
So basically i'm having issues with the authentication side of things with the soundcloud api, so i'm using a webview which is programatically created and attaching this to the same view which works perfectly.
The issue is once i try to authenticate using one of the options from soundcloud either Facebook, Gmail the screen is just blank and it doesn't seem to be authenticating when using the connect with Facebook or gmail the reason why i say it isn't authenticating is because nothing is being logged in the console... and the email screen seems to be stuck as you can see in the image below... There's no callback once the authentication is done and this does work since there is output in the console when i'm testing the data being returned.
So this is the code i'm using to authenticate the user and save the users data below.
` func doOAuthSoundCloud(consumerKey: String, consumerSecret: String) {
@phimage commented on GitHub (Jul 8, 2016):
Did you register oauthswiftexample url scheme in your project ?(see readme How to > Setting URL Schemes )
Did you add the code into AppDelegate to handle URL returned after login?
@tunds commented on GitHub (Jul 8, 2016):
Yep done all of that my url scheme is: oauthswiftexample
My redirect_uri is: oauthswiftexample://oauth-callback/soundcloud/ and this is the same in my soundcloud account, also in my app delegate i have the following, this was working yesterday in my application but after today it's no dice
` func applicationHandleOpenURL(url: NSURL) {
if (url.host == "oauth-callback") {
OAuthSwift.handleOpenURL(url)
} else {
// Google provider is the only one wuth your.bundle.id url schema.
OAuthSwift.handleOpenURL(url)
}
}
@tunds commented on GitHub (Jul 8, 2016):
Moved the code into the actual class where the login occurs fixes this and redirection now works for Facebook and email but not google plus which i will open as a new issue