Skip to content

Cannot login via G Suite (white screen: accounts.google.com/signin/continue) #622

Closed

Description

@nyanpasu64

My university uses a self-hosted login page (shib). After I specify my [email protected] address, Google redirects to shib.university.edu/....

  • Interestingly, Duo Security says cookies aren't enabled so I can't remember 2FA for 30 days. But the stock Android 7.0+GApps university login workflow has the same issue, so this isn't the cause of this problem.

After approving the 2fa, it redirects to a white screen. Logcat:

2018-09-29 03:55:27.917 10734-10734/? D/GmsAuthLoginBrowser: pageFinished: https://accounts.google.com/signin/continue?sarp=1&plt=redacted&PersistentCookie=1&scc=0

I think microG doesn't recognize Google Apps external login URLs and doesn't realize it needs to close the WebView. Code at https://github.com/microg/android_packages_apps_GmsCore/blob/1e444dc4aaae56c381e3e6621f8c0d188963ca03/play-services-core/src/main/java/org/microg/gms/auth/login/LoginActivity.java#L111

Sidenote: This URL is not identical to the "Pidgin Hangouts OAuth destination" ( https://www.youtube.com/watch?v=hlDhp-eNLMU).


switching from lineageOS webview engine to Google Webview (f-droid Chromium doesn't supply webview) doesn't help.

Activity

  1. nyanpasu64 commented on Sep 29, 2018

    @nyanpasu64
    Author

    I visited https://accounts.google.com/EmbeddedSetup?tmpl=new_account in a private desktop Firefox session, recorded network logs with "Persist logs" across page-changes checked.

    https://www.google.com/accounts/signin/continue?sarp=1&plt=redacted&PersistentCookie=1&scc=0

    • redirects via location: header to

    https://accounts.google.com/signin/continue?sarp=1&plt=redacted&PersistentCookie=1&scc=0

    • has several set-cookie: GAPS, oauth_token, user_id headers.
    • Does not redirect anywhere on Firefox desktop.
    • Cookies are scoped accounts.google.com /

    I think you need to add an extra case to your code, to fetch said cookies from this URL.


    Visiting https://accounts.google.com/EmbeddedSetup?tmpl=new_account and logging into a gmail.com account:

    https://accounts.google.com/_/signin/speedbump/embeddedsigninconsent

    • set-cookie accounts.google.com /

    #close is appended to address bar.


    programmaticAuth ? PROGRAMMATIC_AUTH_URL : EMBEDDED_SETUP_URL

    When logging in via G Suite university, the GAPS cookie is set on accounts.google.com / , so LoginActivity.closeWeb() EMBEDDED_SETUP_URL is capable of reading said cookies (even though we did not end up on EMBEDDED_SETUP_URL).

    I'm not sure, maybe closeWeb should take a URL instead of a "is programmatic auth" boolean, and call CookieManager.getInstance().getCookie(URL directly). Not sure if the right cookies are visible for all cases or not (I think it's a functioning replacement for closeWeb(programmaticAuth=false), but haven't tested true).


    I feel microG's interface would benefit if it clearly differentiates screens handled by Google's HTML, from local screens. (I don't like how the login screen is colored blue to imitate Google.) I feel it could help me find out where a bug originates (Google or microG, or some exact point where they interact).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions