[GH-ISSUE #44] Google Drive localhost support!! #25

Closed
opened 2026-03-03 16:44:54 +03:00 by kerem · 1 comment
Owner

Originally created by @ramki1979 on GitHub (Apr 7, 2015).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/44

Register new client as Type: Others, under Installed App Category @ google developer console

oauthswift.webViewController = WebViewController()

// register callbackURL similar to http://localhost/google with 
oauthswift.authorizeWithCallbackURL(...)

// In webview controller delegate method "shouldStartLoadWithRequest" check like below
if (request.URL.scheme == "oauth-swift" || request.URL.host == "localhost" ) {
            self.dismissViewControllerAnimated(true, completion: nil)

            if(request.URL.host == "localhost") {
                OAuth2Swift.handleOpenURL(request.URL)
            }
        }

Originally created by @ramki1979 on GitHub (Apr 7, 2015). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/44 Register new client as Type: Others, under Installed App Category @ google developer console ``` swift oauthswift.webViewController = WebViewController() // register callbackURL similar to http://localhost/google with oauthswift.authorizeWithCallbackURL(...) // In webview controller delegate method "shouldStartLoadWithRequest" check like below if (request.URL.scheme == "oauth-swift" || request.URL.host == "localhost" ) { self.dismissViewControllerAnimated(true, completion: nil) if(request.URL.host == "localhost") { OAuth2Swift.handleOpenURL(request.URL) } } ```
kerem closed this issue 2026-03-03 16:44:55 +03:00
Author
Owner

@phimage commented on GitHub (Nov 9, 2015):

now in demo, google is not used with webViewController(now renamed authorize_url_handler)
so code to manage google is in AppDelegate

<!-- gh-comment-id:155024506 --> @phimage commented on GitHub (Nov 9, 2015): now in demo, google is not used with `webViewController`(now renamed `authorize_url_handler`) so code to manage google is in AppDelegate
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/OAuthSwift#25
No description provided.