feat: Add database configuration and update routing for game creation
This commit is contained in:
@@ -4,6 +4,7 @@ import auth.AuthAction
|
||||
import com.typesafe.config.Config
|
||||
import logic.user.{SessionManager, UserManager}
|
||||
import model.users.User
|
||||
import play.api.Configuration
|
||||
import play.api.libs.json.Json
|
||||
import play.api.mvc.*
|
||||
import play.api.mvc.Cookie.SameSite.Lax
|
||||
@@ -18,7 +19,7 @@ class OpenIDController @Inject()(
|
||||
val openIDService: OpenIDConnectService,
|
||||
val sessionManager: SessionManager,
|
||||
val userManager: UserManager,
|
||||
val config: Config
|
||||
val config: Configuration
|
||||
)(implicit ec: ExecutionContext) extends BaseController {
|
||||
|
||||
def loginWithProvider(provider: String) = Action.async { implicit request =>
|
||||
@@ -62,7 +63,7 @@ class OpenIDController @Inject()(
|
||||
openIDService.getUserInfo(provider, tokenResponse.accessToken).map {
|
||||
case Some(userInfo) =>
|
||||
// Store user info in session for username selection
|
||||
Redirect("http://localhost:5173/select-username")
|
||||
Redirect(config.get[String]("app.url") + "/select-username")
|
||||
.withSession(
|
||||
"oauth_user_info" -> Json.toJson(userInfo).toString(),
|
||||
"oauth_provider" -> provider,
|
||||
|
||||
Reference in New Issue
Block a user