joscha / play-authenticate

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

Play 2.4 and play-authenticate 0.7.x password auth error in production #294

Open achaiah opened 8 years ago

achaiah commented 8 years ago

There seems to be an issue with play-authenticate not being able to locate its settings when a play framework 2.4 production release is created.

In dev mode the plugin works fine, however after creating a distribution following the Play 2.4 Production guide I cannot start the play framework. It crashes with:

java.lang.RuntimeException: Provider 'password' missing needed setting 'mail.verificationLink.secure'
    at com.feth.play.module.pa.providers.AuthProvider.onStart(AuthProvider.java:74)
    at com.feth.play.module.pa.providers.password.UsernamePasswordAuthProvider.onStart(UsernamePasswordAuthProvider.java:70)
    at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:92)
    at play.api.Play$$anonfun$start$1$$anonfun$apply$mcV$sp$1.apply(Play.scala:92)
    at scala.collection.Iterator$class.foreach(Iterator.scala:750)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1202)
    at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
    at play.api.Plugins.foreach(Plugins.scala:57)
    at play.api.Play$$anonfun$start$1.apply$mcV$sp(Play.scala:92)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:87)
    at play.api.Play$$anonfun$start$1.apply(Play.scala:87)
    at play.utils.Threads$.withContextClassLoader(Threads.scala:21)
    at play.api.Play$.start(Play.scala:87)
    at play.core.server.ProdServerStart$.start(ProdServerStart.scala:54)
    at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
    at play.core.server.ProdServerStart.main(ProdServerStart.scala)

This happens even though the dev environment runs fine and the config file is in its proper place -> conf/play-authenticate/mine.conf

Mule52 commented 7 years ago

What are the differences between your mine.conf files? In your mine.conf files, what do you have for password.mail.verificationLink.secure? Whatever they are, do you have the MyPasswordAuthProvider (or whatever yours is) enabled for both dev and prod environments?