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 @@ -70,6 +70,7 @@ object Registration extends Controller {
70
70
val onHandleStartSignUpGoTo = stringConfig(" securesocial.onStartSignUpGoTo" , RoutesHelper .login().url)
71
71
/** The redirect target of the handleSignUp action. */
72
72
val onHandleSignUpGoTo = stringConfig(" securesocial.onSignUpGoTo" , RoutesHelper .login().url)
73
+ val onHandleSignUpGoToOpt = Play .current.configuration.getString(" securesocial.onSignUpGoTo" )
73
74
/** The redirect target of the handleStartResetPassword action. */
74
75
val onHandleStartResetPasswordGoTo = stringConfig(" securesocial.onStartResetPasswordGoTo" , RoutesHelper .login().url)
75
76
/** The redirect target of the handleResetPassword action. */
@@ -242,7 +243,10 @@ object Registration extends Controller {
242
243
}
243
244
val eventSession = Events .fire(new SignUpEvent (user)).getOrElse(session)
244
245
if ( UsernamePasswordProvider .signupSkipLogin ) {
245
- ProviderController .completeAuthentication(user, eventSession).flashing(Success -> Messages (SignUpDone ))
246
+ val authResult = ProviderController .completeAuthentication(user, eventSession).flashing(Success -> Messages (SignUpDone ))
247
+ onHandleSignUpGoToOpt.map { targetUrl =>
248
+ authResult.withHeaders(LOCATION -> targetUrl)
249
+ } getOrElse authResult
246
250
} else {
247
251
Redirect (onHandleSignUpGoTo).flashing(Success -> Messages (SignUpDone )).withSession(eventSession)
248
252
}
You can’t perform that action at this time.
0 commit comments