Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenID authentication with Google failing randomly

When using OpenId lib (scala version) with Google, I randomly get an exception:

 application - Authentication.openIDCallback error on callback from open id
play.api.libs.openid.Errors$AUTH_ERROR$: null
    at play.api.libs.openid.Errors$AUTH_ERROR$.<clinit>(OpenIDError.scala) ~[play_2.9.1.jar:2.0]
    at play.api.libs.openid.OpenID$$anonfun$verifiedId$6$$anonfun$apply$7.apply(OpenID.scala:84) ~[play_2.9.1.jar:2.0]
    at play.api.libs.openid.OpenID$$anonfun$verifiedId$6$$anonfun$apply$7.apply(OpenID.scala:81) ~[play_2.9.1.jar:2.0]
    at play.api.libs.concurrent.STMPromise$$anonfun$map$1$$anonfun$apply$9.apply(Promise.scala:185) ~[play_2.9.1.jar:2.0]
    at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:110) ~[scala-library.jar:na]
    at scala.util.control.Exception$Catch$$anonfun$either$1.apply(Exception.scala:110) ~[scala-library.jar:na]

The exception is raised in code that processes the answer to the OpenID request, default Play 2.0 code, not mine. It seems as if Google wasn't returning the proper answer, but only happens sometimes.

Anyone knows why this happens?

like image 944
Pere Villega Avatar asked Mar 17 '12 21:03

Pere Villega


People also ask

Does Google support OpenID?

Google's OAuth 2.0 APIs can be used for both authentication and authorization. This document describes our OAuth 2.0 implementation for authentication, which conforms to the OpenID Connect specification, and is OpenID Certified.

What is OpenID app in Android?

OpenID allows you to use an existing account to sign in to multiple websites, without needing to create new passwords. You may choose to associate information with your OpenID that can be shared with the websites you visit, such as a name or email address.

Is OpenID safe?

Minimize Password Security Risks With OpenID, passwords are never shared with any websites, and if a compromise does occur, you can simply change the password for your OpenID, thus immediately preventing a hacker from gaining access to your accounts at any websites you visit.


1 Answers

We had exactly the same problem. I recommend using OpenID4Java.

Here is what we use https://gist.github.com/4083410

like image 85
Ivan Meredith Avatar answered Sep 19 '22 07:09

Ivan Meredith