joscha / play-authenticate

An authentication plugin for Play Framework 2.x (Java)
http://joscha.github.com/play-authenticate/
Other
807 stars 366 forks source link

google icon does not appear #326

Closed 030 closed 7 years ago

030 commented 7 years ago

when sbt run is executed in samples/java/play-authenticate-usage then a webpage is shown but there is no google icon. How to let it appear?

joscha commented 7 years ago

You need to enable the Google oauth adapter in the plugin config and add the key and secret to the conf file. You can have a look at the simple example on how to do that.

On 19 Jan. 2017 09:32, "030" notifications@github.com wrote:

when sbt run is executed in samples/java/play-authenticate-usage then a webpage is shown but there is no google icon. How to let it appear?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joscha/play-authenticate/issues/326, or mute the thread https://github.com/notifications/unsubscribe-auth/AALehhzWH4wpXd65PzPpN6umWhlFvEobks5rTpL3gaJpZM4LneaN .

030 commented 7 years ago

I have entered the client and id in play-authenticate/samples/java/play-authenticate-usage/conf/play-authenticate/mine.conf but the icon will not appear

joscha commented 7 years ago

did you also enable the google plugin? See https://github.com/joscha/play-authenticate/blob/master/samples/java/play-authenticate-usage/app/module/MyModule.java

030 commented 7 years ago

Yes the google plugin has been enabled:

bind(GoogleAuthProvider.class).asEagerSingleton();

and when the application is run using sbt run and one navigates to localhost:9000 it results in:

play.sbt.PlayExceptions$CompilationException: Compilation error[cannot find symbol
  symbol:   class GoogleAuthProvider
  location: class module.MyModule]
    at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)
    at play.sbt.PlayExceptions$CompilationException$.apply(PlayExceptions.scala:27)
    at scala.Option.map(Option.scala:145)
    at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:49)
    at play.sbt.run.PlayReload$$anonfun$taskFailureHandler$1.apply(PlayReload.scala:44)
    at scala.Option.map(Option.scala:145)
    at play.sbt.run.PlayReload$.taskFailureHandler(PlayReload.scala:44)
    at play.sbt.run.PlayReload$.compileFailure(PlayReload.scala:40)
    at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)
    at play.sbt.run.PlayReload$$anonfun$compile$1.apply(PlayReload.scala:17)
030 commented 7 years ago

I forgot to import

import com.feth.play.module.pa.providers.oauth2.google.GoogleAuthProvider;
030 commented 7 years ago

Current issue:

Error: redirect_uri_mismatch

The redirect URI in the request, http://localhost:9000/authenticate/google, does not match
the ones authorized for the OAuth client. Visit 
 to update the authorized redirect URIs.
030 commented 7 years ago

After adding http://localhost:9000/authenticate/google in the console it works to login with my account. Thank you!