“This app would like to: Have offline access” when access_type=online

I think G does this when your app requests a token and there is still a valid access or refresh token for the user for the scopes in question. The solution is to revoke tokens when you’re done with them (either on user logout or immediately after authenticating the user) by issuing this request: https://accounts.google.com/o/oauth2/revoke?token={token} … Read more

Is it possible to use OAuth 2.0 without a redirect server?

Yes, it is possible to use OAuth2 without a callback URL. The RFC6749 introduces several flows. The Implicit (now deprecated[1]) and Authorization Code grant types require a redirect URI. However the Resource Owner Password Credentials (deprecated as well[1]) grant type does not. Since RFC6749, other specifications have been issued that do not require any redirect … Read more

Spring Boot 2.0.0 + OAuth2

Spring Security 5 uses a modernized password storage, see OAuth2 Autoconfig: If you use your own authorization server configuration to configure the list of valid clients through an instance of ClientDetailsServiceConfigurer as shown below, take note that the passwords you configure here are subject to the modernized password storage that came with Spring Security 5. … Read more

How to send emails with google using nodemailer after Google disabled less sure app option?

At the time of writing, Less Secure Apps is no longer supported by google. And you can’t use your google account password. You’re gonna have to generate a new app password. App passwords only work if 2-step verification is turned on. Follow this steps to get the app password Go to https://myaccount.google.com/security Enable 2FA Create … Read more

Android Google+ integration – repeated UserRecoverableAuthException

I’ve had this issue for a while and came up with a proper solution. String token = GoogleAuthUtil.getToken(this, accountName, scopeString, appActivities); This line will either return the one time token or will trigger the UserRecoverableAuthException. On the Google Plus Sign In guide, it says to open the proper recovery activity. startActivityForResult(e.getIntent(), RECOVERABLE_REQUEST_CODE); When the activity … Read more