[GH-ISSUE #180] Is it possible to use app switch instead of browser #108

Closed
opened 2026-03-03 16:45:44 +03:00 by kerem · 8 comments
Owner

Originally created by @yinanfang on GitHub (Feb 8, 2016).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/180

Is it possible to use app switch instead of browser?
In my app, I want to first check if the Facebook app exist on the device and then decide whether I should obtain the token from the FB app or from Safari. It would be great if OAuthSwift can provide such an alternative. If there is, where can I can a simple demo app?

Originally created by @yinanfang on GitHub (Feb 8, 2016). Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/180 Is it possible to use app switch instead of browser? In my app, I want to first check if the Facebook app exist on the device and then decide whether I should obtain the token from the FB app or from Safari. It would be great if OAuthSwift can provide such an alternative. If there is, where can I can a simple demo app?
kerem 2026-03-03 16:45:44 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@phimage commented on GitHub (Feb 9, 2016):

I am not familiar with "app switch" but I think it is not OAuth so nothing to do with oauthswift framework

I don't really understand what you trying to achieve...
and if facebook app could provide you some token to make api request....

<!-- gh-comment-id:181647980 --> @phimage commented on GitHub (Feb 9, 2016): I am not familiar with "app switch" but I think it is not OAuth so nothing to do with oauthswift framework I don't really understand what you trying to achieve... and if facebook app could provide you some token to make api request....
Author
Owner

@yinanfang commented on GitHub (Feb 9, 2016):

I guess my wording is pretty confusing. Let me try to clarify this.
So OAuthSwift will redirect user to a web view and let the user sign in there. Then the browser will redirect the user back.
I saw some other application achieve the OAuth process by redirecting the user to the FB app, which simply do the same thing as a browser. I just feel like logging people in using the FB app will look more legit so I'm wondering if OAuthSwift provide such function.

<!-- gh-comment-id:181659559 --> @yinanfang commented on GitHub (Feb 9, 2016): I guess my wording is pretty confusing. Let me try to clarify this. So OAuthSwift will redirect user to a web view and let the user sign in there. Then the browser will redirect the user back. I saw some other application achieve the OAuth process by redirecting the user to the FB app, which simply do the same thing as a browser. I just feel like logging people in using the FB app will look more legit so I'm wondering if OAuthSwift provide such function.
Author
Owner

@phimage commented on GitHub (Feb 9, 2016):

How can you see that other app achieve oauth by redirecting the user to the FB app? Did you monitor network to see all network request? if not, you cannot.

That's not oauth for me, just another login/authentification process through the app
So until some documentation show me that I am wrong, this will not be legit here in oauthswift

Try to investifage facebook sdk intead of oauthswift
and do not forget to close this issue

<!-- gh-comment-id:181815418 --> @phimage commented on GitHub (Feb 9, 2016): How can you see that other app achieve **oauth** by redirecting the user to the FB app? Did you monitor network to see all network request? if not, you cannot. That's not **oauth** for me, just another login/authentification process through the app So until some documentation show me that I am wrong, this will not be legit here in oauthswift Try to investifage facebook sdk intead of oauthswift and do not forget to close this issue
Author
Owner

@yinanfang commented on GitHub (Feb 9, 2016):

Thank you for the explanation. Because login through the app also show me the access scope or something, that seems to be oauth. That must by my mis-conception.

<!-- gh-comment-id:181869173 --> @yinanfang commented on GitHub (Feb 9, 2016): Thank you for the explanation. Because login through the app also show me the access scope or something, that seems to be oauth. That must by my mis-conception.
Author
Owner

@phimage commented on GitHub (Feb 9, 2016):

Yes I really don't know if it is or not
Facebook api doc must explain that, that's not part of oauth protocol itself

<!-- gh-comment-id:181875516 --> @phimage commented on GitHub (Feb 9, 2016): Yes I really don't know if it is or not Facebook api doc must explain that, that's not part of oauth protocol itself
Author
Owner

@yinanfang commented on GitHub (Feb 9, 2016):

Sorry for bothering you again. Just one last question before I close this. Do you know how does the FB SDK log people in? I am choosing between FB SDK and OAuthSwift now. I know they achieve the same function, but if I choose FB SDK then I would also need to use Google/Twitter SDK if I want to login through them. For me, the benefit of using OAuthSwift is that I only need one library and it will work for all thrid party services.

<!-- gh-comment-id:181875563 --> @yinanfang commented on GitHub (Feb 9, 2016): Sorry for bothering you again. Just one last question before I close this. Do you know how does the FB SDK log people in? I am choosing between FB SDK and OAuthSwift now. I know they achieve the same function, but if I choose FB SDK then I would also need to use Google/Twitter SDK if I want to login through them. For me, the benefit of using OAuthSwift is that I only need one library and it will work for all thrid party services.
Author
Owner

@phimage commented on GitHub (Feb 9, 2016):

no idea maybe the source is
https://github.com/facebook/facebook-ios-sdk
and there is maybe some protocol to exchange between sdk and facebook app and maybe oauth is used
to communicate maybe url scheme is used (specific url scheme or path)

OAuthSwift allow you to specifty the oauthswift.authorize_url_handler to handle the url and open safari, display a webview and maybe launch other app as you wish

<!-- gh-comment-id:181909154 --> @phimage commented on GitHub (Feb 9, 2016): no idea maybe the source is https://github.com/facebook/facebook-ios-sdk and there is maybe some protocol to exchange between sdk and facebook app and maybe oauth is used to communicate maybe url scheme is used (specific url scheme or path) OAuthSwift allow you to specifty the `oauthswift.authorize_url_handler` to handle the url and open safari, display a webview and maybe launch other app as you wish
Author
Owner

@yinanfang commented on GitHub (Feb 9, 2016):

Thank you so much for the advice! I'll see if I can use the oauthswift.authorize_url_handler to open the FB app auth page.

<!-- gh-comment-id:181950753 --> @yinanfang commented on GitHub (Feb 9, 2016): Thank you so much for the advice! I'll see if I can use the `oauthswift.authorize_url_handler` to open the FB app auth page.
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#108
No description provided.