Giter VIP home page Giter VIP logo

Comments (16)

gregor-srdic avatar gregor-srdic commented on August 19, 2024 3

Further research thanks to a colleague revealed, that window.handleOpenURL method was also being invoked when the popup window showed a blank web page.
With some experimenting I was able to find the solution, which is a timeout in handleOpenURL function.

window.handleOpenURL = function (url) { 
window.setTimeout(function () {
PKCEClient.onRedirectUri(url); 
}, 100);
}

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024 1

yes, if I reset the simulator (delete all settings) I can login the first time with google account. Then if I log out, and even if I remove the app and reinstall it, it gets stuck on the blank page :S
I am now testing with Native auth0 client, I have set team id and bundle id in client settings, but nothing seems to help.

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024 1

update: we checked the auth0 log and there is a record of a successful login
therefore, this must be a problem when safariViewController tries to automatically redirect back to the app, when credentials are already available.

from auth0-cordova.

darkyen avatar darkyen commented on August 19, 2024

Can you check if the "Client Type" is selected as "Native" in Dashboard > Clients > Your Client Name > Settings

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024

Thanks. It is not, I am not sure if I can change that on the old client (currently running in production :( ), will certainly do on the new one. Hopefully it will solve the problem, though I don't really see how that is connected :) The problem only appears on iOs and only when client has been logged in with the same social provider before.

from auth0-cordova.

hzalaz avatar hzalaz commented on August 19, 2024

@gregor-srdic in iOS does it work when the user is not previously logged in?

If not, please check that you installed the plugins detailed in the README correctly. Since cordova plugins tends to be a bit brittle I'd recommend removing the iOS platform and re-adding it.

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024

after more research I found out that if I sign out of my google account in safari, I can login in cordova app again, first time.
And further, cordova app sign in always works if i sign into two or more google accounts in safari.
Therefore this must be an issue with automatic login with google account that occurs if user has previously logged in with single google account.

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024

Does anyone have anything to add to this? It seems painful to ask users to delete safari cookies and web data every time they log out and want to log back in :S

from auth0-cordova.

MT-- avatar MT-- commented on August 19, 2024

SafariViewController does not dismiss and callbacks are not running. The logs in the Auth0 dashboard show successful logins and signups.

img_0018

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024

@MT-- based on the screenshot your problem does not seem the same, I would say you have a problem with callback to the application. Perhaps you should try removing and re-ading the cordova-plugin-customurlscheme plugin and be careful about lower case like #38

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024

my situation stops at this
done

from auth0-cordova.

gregor-srdic avatar gregor-srdic commented on August 19, 2024

Further research: Also if I revoke access to the application in google/facebook account, I can normally log in once again.

from auth0-cordova.

nitinchangwal avatar nitinchangwal commented on August 19, 2024

In phonegap build the same issue occurred for me.
SafariViewController does not dismiss and callbacks are not running. The logs in the Auth0 dashboard show successful logins and signups.
I tried setTimeout function in window.handleOpenURL but it is not work for me.
i tried deeplink plugin instead of color schema url also.

from auth0-cordova.

anacesponda avatar anacesponda commented on August 19, 2024

Hi @gregor-srdic I'm having the same problem that you were having. Fb is working fine but when trying to sign in with Gmail, the first time it's 👌 , but once the user is logged it shows me the Website Name. I tried with your solution but still not working. Do you have any news about it?
Thanks

from auth0-cordova.

GODBS avatar GODBS commented on August 19, 2024

I have the exact same issue :(

from auth0-cordova.

jwmann avatar jwmann commented on August 19, 2024

I was able to temporarily solve this for iOS by 'Erasing all Settings and Contents' from the Simulator and running the emulator again from scratch.

Must be some kind of cache that somehow persists even after you quit the simulator?

from auth0-cordova.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.