forked from External/greenlight
able to handle launcher login with gem
This commit is contained in:
@ -7,7 +7,7 @@ class MainController < ApplicationController
|
||||
def index
|
||||
if current_user
|
||||
# Redirect authenticated users to their room.
|
||||
redirect_to room_path(current_user.room)
|
||||
redirect_to room_path(current_user.main_room)
|
||||
else
|
||||
# Redirect unauthenticated users to root.
|
||||
#TODO use env? for launcher login endpoint
|
||||
|
@ -67,19 +67,19 @@ class User < ApplicationRecord
|
||||
end
|
||||
|
||||
def bn_launcher_name(auth)
|
||||
auth['user_info']['username']
|
||||
auth['info']['name']
|
||||
end
|
||||
|
||||
def bn_launcher_username(auth)
|
||||
auth['user_info']['username']
|
||||
auth['info']['username']
|
||||
end
|
||||
|
||||
def bn_launcher_email(auth)
|
||||
auth['user_info']['email']
|
||||
auth['info']['email']
|
||||
end
|
||||
|
||||
def bn_launcher_image(auth)
|
||||
""
|
||||
auth['info']['image']
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user