mirror of
https://github.com/OAuthSwift/OAuthSwift.git
synced 2026-04-26 12:45:52 +03:00
[GH-ISSUE #424] Not able to sign in using the latest Google OAuth provider #273
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#273
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 @mervyn777 on GitHub (Dec 16, 2017).
Original GitHub issue: https://github.com/OAuthSwift/OAuthSwift/issues/424
Description:
OAuth SignIn doesn't work with the latest Google OAuth process. Now the iOS/Android OAuth clients don't provide the Client Secret without which the library does not successfully fetch the token. If we use Web client instead during registration on Google API console we cannot set the custom callback URI.(Even if we do it throws error during sign in process). Your demo example is outdated and shows a different http schemed redirect URI. Please let me know if I'm missing something.
URL received on app delegate:
<app.bundle.id>:/oauth2redirect?code=4/2O3vlmmgWeJWUrrFSK3ygp3JtN5ioNb7LvHiYJYU&authuser=0&session_state=4d9f34f683268c9198ca81fe302031c1a212784d..70a8&prompt=consent#Error received:
OAuthSwiftError error -3OAuth Provider:
Google
OAuth Version:
OS (Please fill the version) :
Installation method:
Library version:
Xcode version:
9.0 (Swift 4.0)
9.0 (Swift 3.2)
8.x (Swift 3.x)
8.0 (Swift 2.3)
7.3.1
other: (Please fill in the version you are using.)
objective c
@phimage commented on GitHub (Dec 16, 2017):
error -3 maybe oauthswift.allowMissingStateCheck = true could help
@mervyn777 commented on GitHub (Dec 18, 2017):
Thanks that helped!
As for the
OAuthSwiftURLHandlerTypeI'm using the built-inSafariURLHandlerbut how can I get notified if the user cancels the authorization process by pressingDonein the consent screen.Is it possible to return back this action in the form of failure callback event while requesting authorization? Something like
failure?(OAuthSwiftError.cancelled)?The problem is I'm handling OAuth related functions in a non NSObject class and I cant implement the
SFSafariViewControllerDelegateto be notified about user dismissal actions. (I see I can set this delegate toSafariURLHandler.#delegate)Update:
One quick way I fixed it was by extending
SafariURLHandler:But this will require the modifier of func
safariViewControllerDidFinishto be open to be overridden.Let me know if there's a better way to solve this.
@phimage commented on GitHub (Dec 22, 2017):
@mervyn777 do not hesitate to PR if you need add
opento some functions