OAuth2 and Google API: access token expiration time?

You shouldn’t design your application based on specific lifetimes of access tokens. Just assume they are (very) short lived. However, after a successful completion of the OAuth2 installed application flow, you will get back a refresh token. This refresh token never expires, and you can use it to exchange it for an access token as … Read more

Why do access tokens expire?

This is very much implementation specific, but the general idea is to allow providers to issue short term access tokens with long term refresh tokens. Why? Many providers support bearer tokens which are very weak security-wise. By making them short-lived and requiring refresh, they limit the time an attacker can abuse a stolen token. Large … Read more

Restrict Login Email with Google OAuth2.0 to Specific Domain Name

So I’ve got an answer for you. In the OAuth request you can add hd=example.com and it will restrict authentication to users from that domain (I don’t know if you can do multiple domains). You can find hd parameter documented here I’m using the Google API libraries from here: http://code.google.com/p/google-api-php-client/wiki/OAuth2 so I had to manually … Read more

The signing fingerprint you specified is already used by another Android OAuth2 client

This error occurs when there is an existing SIGNING CERTIFICATE FINGERPRINT (SHA1) on Google Developers linked to a different account. Solution is to delete the project that is using that SHA1 in console.developers.google.com for the old/incorrect project. You cannot change the SHA1 fingerprint once it is set. Remember that deleting the project takes 7 days … Read more

403 Error – Thats an error. Error: disallowed_useragent

In my case I was using native web view to login with Google, I find out the way that you should provide user agent to webview it was worked for me. Try below code I am sure it will worked. Add the code in application didFinishLaunchingWithOptions Objective C NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:@”Mozilla/5.0 (Windows NT … Read more