mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-27 05:05:51 +03:00
[GH-ISSUE #331] A suggestion #206
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#206
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 @nawar on GitHub (Jan 12, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/331
Description:
Change the user agent to that of Safari to bypass Google's check on browser
OAuth Provider
Google
I'm just wondering why you are not enforcing the
User-Agentto be that of Safari's to avoid having the final load request, after the login, to be redirected to the heroku app, and instead, intercept it usingshouldStartLoadWith:request:navigationTypeofUIWebViewDelegate?@phimage commented on GitHub (Jan 16, 2017):
I don"t understand very well your suggestion
First the choice of
authorizeURLHandleris yours and could be aSFSafariViewController, a uiwebview, a wkwebview etc...I think User Agent is also your choice, not OAuthSwift choice
demo app use
UIWebViewDelegateand implementshouldStartLoadWith:request:navigationTypelike I do in OSX code demo , yes you can intercept request to avoid URL scheme redirection method
there is a wiki page to explain that https://github.com/OAuthSwift/OAuthSwift/wiki/API-with-only-HTTP-scheme-into-callback-URL
this is demo app so it's not the main framework
@nawar commented on GitHub (Jan 16, 2017):
No worries. All that I was trying to say is, because how Google only accepts authentication requests coming from a browser, not a web view embedded within the app (I didn't try using WKWebView though), I feel that the web page redirection solution is not optimal. That's the reason I suggested to enforcing the UserAgent as it'll keep the authentication process within the app itself, without the need to spin-off a server just for that redirection.
I'll just close this.