File tree 1 file changed +5
-1
lines changed
module-code/app/securesocial/controllers
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ object Registration extends Controller {
69
69
val onHandleStartSignUpGoTo = stringConfig(" securesocial.onStartSignUpGoTo" , RoutesHelper .login().url)
70
70
/** The redirect target of the handleSignUp action. */
71
71
val onHandleSignUpGoTo = stringConfig(" securesocial.onSignUpGoTo" , RoutesHelper .login().url)
72
+ val onHandleSignUpGoToOpt = Play .current.configuration.getString(" securesocial.onSignUpGoTo" )
72
73
/** The redirect target of the handleStartResetPassword action. */
73
74
val onHandleStartResetPasswordGoTo = stringConfig(" securesocial.onStartResetPasswordGoTo" , RoutesHelper .login().url)
74
75
/** The redirect target of the handleResetPassword action. */
@@ -245,7 +246,10 @@ object Registration extends Controller {
245
246
}
246
247
val eventSession = Events .fire(new SignUpEvent (user)).getOrElse(session)
247
248
if ( UsernamePasswordProvider .signupSkipLogin ) {
248
- ProviderController .completeAuthentication(user, eventSession).flashing(Success -> Messages (SignUpDone ))
249
+ val authResult = ProviderController .completeAuthentication(user, eventSession).flashing(Success -> Messages (SignUpDone ))
250
+ onHandleSignUpGoToOpt.map { targetUrl =>
251
+ authResult.withHeaders(LOCATION -> targetUrl)
252
+ } getOrElse authResult
249
253
} else {
250
254
Redirect (onHandleSignUpGoTo).flashing(Success -> Messages (SignUpDone )).withSession(eventSession)
251
255
}
You can’t perform that action at this time.
0 commit comments