Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

When authenticating google+ doesn't redirect back to app but stays in google+ #15

Closed
tfmalt opened this issue Nov 6, 2014 · 11 comments
Closed

Comments

@tfmalt
Copy link

tfmalt commented Nov 6, 2014

Use case is as follows:

  1. login in triggered as expected from app.
  2. Google+ opens and tells me to pick a google id.
  3. The consent screen in shown correctly. I press OK
  4. phone stays in google+, no callback is sent to app.

Is this a know issue? What can I do to help track down the cause?

@tfmalt
Copy link
Author

tfmalt commented Nov 6, 2014

When I uninstalled the google+ app on my iPhone it sent me to the browser version.
The consent screen is displayed as expected, but I get told: "Safari cannot open the page because the address is invalid".

@srameshr
Copy link

How did you manage to sign into the app?

Can you share some code please? I am finding it difficult. I always get a 'user cancelled' error message.

And has Eddy stopped supporting this plugin?

@calvingferrando
Copy link

I also encountered this one. I can call the google+ account or browser and can login successfully but callback and redirecting back to the app is not happening. What might be the problem?

@calvingferrando
Copy link

Solved this one! Make sure to put the value you used on the Bundle Id to your *-info.plist inside the CFBundleURLTypes like a url scheme. Example com.myapp.app

@EddyVerbruggen
Copy link
Owner

@calvingferrando the plugin.xml specifies adding the CFBundleURLTypes. Did you perhaps not use plugman (cordova plugin add ..) to install the plugin? Or did you perhaps manually change the bundleid afterwards?

@calvingferrando
Copy link

@EddyVerbruggen , I just followed the installation steps from the README.md by using (cordova plugin add ..)

@fmammoli
Copy link

I've manually changed my bundleid on cordova's config.xml and I experienced the same problem described by @calvingferrando, the fix worked too. Maybe it's a good thing to put on troubleshooting part.

@subzerodigital
Copy link

Good work @calvingferrando

EddyVerbruggen added a commit that referenced this issue Dec 1, 2014
@EddyVerbruggen
Copy link
Owner

Thanks guys, I've added a Troubleshooting section to the readme based on your findings.

shinyMetilda pushed a commit to shinyMetilda/cordova-plugin-googleplus that referenced this issue Mar 22, 2016
pwbs pushed a commit to pwbs/cordova-plugin-googleplus that referenced this issue Jun 27, 2017
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 7 commits.
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 3 commits.
# This is the 1st commit message:
# This is a combination of 2 commits.
# This is the 1st commit message:

# This is a combination of 6 commits.
# This is the 1st commit message:
# This is a combination of 10 commits.
# This is the 1st commit message:
Finished implementation

# The commit message EddyVerbruggen#2 will be skipped:

#	Attempt at some decent documentation

# The commit message EddyVerbruggen#3 will be skipped:

#	Attempt at some decent documentation

# The commit message EddyVerbruggen#4 will be skipped:

#	Added iOS screenshots

# The commit message EddyVerbruggen#5 will be skipped:

#	cleanup

# The commit message EddyVerbruggen#6 will be skipped:

#	Added a permission for Android preventing a crash on some devices

# The commit message EddyVerbruggen#7 will be skipped:

#	Cleanup

# The commit message EddyVerbruggen#8 will be skipped:

#	iOSApiKey is for iOS, not for Android :)

# The commit message EddyVerbruggen#9 will be skipped:

#	EddyVerbruggen#3 redirect url not handled when redirected from Google+ app on iOS

# The commit message EddyVerbruggen#10 will be skipped:

#	EddyVerbruggen#6 ADD Birthday and AgeRange

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#6 ADD Birthday and AgeRange (wasn't really happy with the PR, so I changed it a bit and added iOS support). Thanks for the help!

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#6 addtional checks on Android

# The commit message EddyVerbruggen#3 will be skipped:

#	Add userId property to let developer to get Google user ID for business logic.

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#7, needed to manually merge

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#7, needed additional flag

# The commit message EddyVerbruggen#6 will be skipped:

#	Missing dependency for iOS 8 SDK

# The commit message EddyVerbruggen#7 will be skipped:

#	Android - play services jar fixed version

# The commit message EddyVerbruggen#8 will be skipped:

#	Android playservices updated to 21

# The commit message EddyVerbruggen#9 will be skipped:

#	Update README.md
#
#	Fix typo. I believe this is for iOS only right now and not Android yet if I'm not mistaken.

# The commit message EddyVerbruggen#10 will be skipped:

#	A note about Android config

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#15 added troubleshooting section

# The commit message EddyVerbruggen#2 will be skipped:

#	Adding idToken to Android
#
#	Based on this gist [1] I'm adding support for getting the auth oauth2 token
#	that Google generates after the user accepts the login.
#
#	[1] https://gist.github.com/ianbarber/5170508

# The commit message EddyVerbruggen#3 will be skipped:

#	Introducing idToken and oauthToken
#
#	Allow the user to configure the service so any of the 3 possibles can be reached
#	when the user passes webApiKey in the credentials dictionary will get a JWT token
#	id, if androidApiKey is set in the credentials then an off-line capable oauth2
#	token bearer will be generated in the oauthToken value, while if no argument is
#	set a simple oauth2 token will get generated.

# The commit message EddyVerbruggen#4 will be skipped:

#	Adding extra necessary permissions

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#12 oauthToken for iOS

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#22 User-cancelled login on iOS - Neither the success nor error callbacks are called

# The commit message EddyVerbruggen#7 will be skipped:

#	EddyVerbruggen#26 Preparing submission to plugins.cordova.io

# The commit message EddyVerbruggen#8 will be skipped:

#	Prep plugin registry release (as tarball, to circumvent an npm symlink issue)

# The commit message EddyVerbruggen#9 will be skipped:

#	Added a warning about the current state of the plugman publish command

# The commit message EddyVerbruggen#10 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#1 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#2 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#3 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#4 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#5 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#6 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#7 will be skipped:

#	Removing the symlinks from iOS libs to be plugman (npm) publish compliant

# The commit message EddyVerbruggen#8 will be skipped:

#	EddyVerbruggen#37 Google+ login using web browser is rejected on the App Store.

# The commit message EddyVerbruggen#9 will be skipped:

#	From Cordova 4 setActivityResultCallback is on CordovaInterfaceImpl

# The commit message EddyVerbruggen#10 will be skipped:

#	Not importing android-support-v4

# The commit message EddyVerbruggen#1 will be skipped:

#	EddyVerbruggen#45 login and trySilendLogin now return userdata on Android

# The commit message EddyVerbruggen#2 will be skipped:

#	Update plugin.xml

# The commit message EddyVerbruggen#3 will be skipped:

#	Update plugin.xml

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#56 new playservices version

# The commit message EddyVerbruggen#5 will be skipped:

#	npm

# The commit message EddyVerbruggen#6 will be skipped:

#	or not to npm..

# The commit message EddyVerbruggen#7 will be skipped:

#	replace deprecated dependency plugin

# The commit message EddyVerbruggen#8 will be skipped:

#	New ID, published to npm

# The commit message EddyVerbruggen#9 will be skipped:

#	New ID, published to npm

# The commit message EddyVerbruggen#10 will be skipped:

#	PGB note

# The commit message EddyVerbruggen#1 will be skipped:

#	Update dependencies to gradle format to fix EddyVerbruggen#64

# The commit message EddyVerbruggen#2 will be skipped:

#	bump

# The commit message EddyVerbruggen#3 will be skipped:

#	Switch to Google Sign-In SDK for iOS
#
#	This should fix Apple rejection from popping up Safari.
#	Will update README soon.
#	Update version to 3.0.0.

# The commit message EddyVerbruggen#4 will be skipped:

#	Allowed scope to be passed into signin

# The commit message EddyVerbruggen#5 will be skipped:

#	Attempt to fix offline screen

# The commit message EddyVerbruggen#6 will be skipped:

#	Cleanup for google plus connection with scopes and offline access

# The commit message EddyVerbruggen#7 will be skipped:

#	Fixed REVERSED_CLIENT_ID variable

# The commit message EddyVerbruggen#8 will be skipped:

#	Invalid quotes (according to my IDE)

# The commit message EddyVerbruggen#9 will be skipped:

#	Made ios use scopes

# The commit message EddyVerbruggen#10 will be skipped:

#	Added server auth code logic for ios

# The commit message EddyVerbruggen#1 will be skipped:

#	Made server auth code not throw a null reference

# The commit message EddyVerbruggen#2 will be skipped:

#	Plugin update to 4.0.0:
#	- Changed the ID to cordova-plugin-googleplus (again)
#	- Wider Android dependent fwk compatibility
#	- Documented scopes feature
#	- Removed the need for the iosApiKey

# The commit message EddyVerbruggen#3 will be skipped:

#	Fixed npm reference in doc

# The commit message EddyVerbruggen#4 will be skipped:

#	EddyVerbruggen#95 Crash when using isAvailable method before login

# The commit message EddyVerbruggen#5 will be skipped:

#	access_token fix for iOS
#
#	The access_token will now be returned as: accessToken

# The commit message EddyVerbruggen#6 will be skipped:

#	* generate both oauthToken and idToken

# The commit message EddyVerbruggen#7 will be skipped:

#	Added an "offline" parameter to enable getting a server auth token even without androidApiKey.

# The commit message EddyVerbruggen#8 will be skipped:

#	Added info to README about the API key for serverClientId.

# The commit message EddyVerbruggen#9 will be skipped:

#	Google decided to change a link without adding a nice redirect

# The commit message EddyVerbruggen#10 will be skipped:

#	Enabled getting serverAuthCode when the webApiKey param is set.

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#108 Added an option to generate access token for offline access on Android

# The commit message EddyVerbruggen#3 will be skipped:

#	EddyVerbruggen#82 Google Plus window not loading!
#	EddyVerbruggen#113 Not getting user extras (e.g. imageUrl) in callback object. Re-added imageUrl for iOS

# The commit message EddyVerbruggen#4 will be skipped:

#	Android: Ensure a new one time token on each login
#
#	When using the androidApiKey parameter a short-lived one time token
#	is generated, which can then be passed to the server where it can be
#	exchanged for a proper access and refresh token. Since all tokens get
#	cached by GoogleAuthUtil logging in a second time will cause the token
#	to be invalid if it was used before or some time has passed.

# The commit message EddyVerbruggen#5 will be skipped:

#	EddyVerbruggen#118 App Crash

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#147 Android fwk tags

# The commit message EddyVerbruggen#7 will be skipped:

#	Android 6.0
#
#	Added call to request permission

# The commit message EddyVerbruggen#8 will be skipped:

#	EddyVerbruggen#149 Android 6.0

# The commit message EddyVerbruggen#9 will be skipped:

#	IOS Build fails with compilation errors EddyVerbruggen#150

# The commit message EddyVerbruggen#10 will be skipped:

#	IOS Build fails with compilation errors EddyVerbruggen#150

# The commit message EddyVerbruggen#1 will be skipped:

#	Android: Gets a new offline token on each login
#
#	Based on EddyVerbruggen#119
#	I tested this on an app I'm working where every authentication attempt returned the same invalid token. After applying this change, the authentication works fine each time.

# The commit message EddyVerbruggen#2 will be skipped:

#	Get refreshToken on iOS sign in
#
#	The refresh token is a useful token for third party apps, to refresh the access token and keep users logged in.

# The commit message EddyVerbruggen#3 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#4 will be skipped:

#	Updated Google Sign-In iOS SDK to 2.4.0

# The commit message EddyVerbruggen#5 will be skipped:

#	Enabled GoogleOpenSource.framework explicitely

# The commit message EddyVerbruggen#6 will be skipped:

#	EddyVerbruggen#153 Ios updated google framework

# The commit message EddyVerbruggen#2 will be skipped:

#	EddyVerbruggen#168 IOS Build failure with this plugin

# The commit message EddyVerbruggen#2 will be skipped:

#	Added a few npm keywords

# The commit message EddyVerbruggen#3 will be skipped:

#	Update GooglePlus.java
#
#	Fix for app crash on android 6

# The commit message EddyVerbruggen#2 will be skipped:

#	A note about failing Android builds

# The commit message EddyVerbruggen#3 will be skipped:

#	Adding a link to how to use keytool

# The commit message EddyVerbruggen#2 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#3 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#4 will be skipped:

#	Google success login redirects to google.com issue fixed

# The commit message EddyVerbruggen#5 will be skipped:

#	iOS readme updated to include latest Google SDK changes

# The commit message EddyVerbruggen#6 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#7 will be skipped:

#	Update README.md

# The commit message EddyVerbruggen#2 will be skipped:

#	Remove OpenSource and Plus libraries.

# The commit message EddyVerbruggen#2 will be skipped:

#	ignoring some more files

# The commit message EddyVerbruggen#2 will be skipped:

#	Google SignIn framework bump

# The commit message EddyVerbruggen#2 will be skipped:

#	ignore

# The commit message EddyVerbruggen#2 will be skipped:

#	testing sth

# The commit message EddyVerbruggen#3 will be skipped:

#	testing sth

# The commit message EddyVerbruggen#2 will be skipped:

#	new demos for firebase and ionic2+firebase

# The commit message EddyVerbruggen#3 will be skipped:

#	typo fix
@tallcoder
Copy link

This was happening to me after updating cordova-ios to 5.0. Once I realized that's what changed and downgraded it back to 4.5.4, google login started working again.

Hopefully, this issue gets fixed because now I cannot move to cordova-ios 5.0 yet.

@sofienbenab
Copy link

Dear all, I'm facing the same issue with ionic 3 (ios cordova version 4.5.5).

Mister @calvingferrando, can you please precise how to add the bundle id to the URL types scheme in the *-info.plist ?
what are the values of these fields please if my bundle id is com.app

Capture d’écran 2019-05-08 à 21 20 59

and if add a CFBundleURLTypes tag to my *-info.plist it looks like this but I still don't get how to put the information :

Capture d’écran 2019-05-08 à 21 24 05

Many thanks in advance for your help :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants