able to handle launcher login

This commit is contained in:
bruckwubete
2018-06-29 10:07:06 -04:00
parent 3748bb2140
commit e3e32365d0
9 changed files with 69 additions and 29 deletions

View File

@@ -5,6 +5,14 @@ class MainController < ApplicationController
# GET /
def index
if current_user
# Redirect authenticated users to their room.
redirect_to room_path(current_user.room)
else
# Redirect unauthenticated users to root.
#TODO use env? for launcher login endpoint
redirect_to "#{Rails.configuration.relative_url_root}/auth/bn_launcher"
end
end
private