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?
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.
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.
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.
We had exactly the same problem. I recommend using OpenID4Java.
Here is what we use https://gist.github.com/4083410
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With