diff --git a/Gemfile b/Gemfile index 2450d40fd..08322a640 100644 --- a/Gemfile +++ b/Gemfile @@ -21,7 +21,7 @@ source 'https://rubygems.org' -gem 'glogin', '0.14.0' +gem 'glogin', '0.14.1' gem 'haml', '6.3.0' gem 'iri', '0.8.0' gem 'loog', '0.5.1' diff --git a/Gemfile.lock b/Gemfile.lock index a1e1c23e3..ed297d4cd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,7 +76,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) ffi (1.16.3) - glogin (0.14.0) + glogin (0.14.1) base58 (>= 0.2) openssl (>= 2.0) haml (6.3.0) @@ -271,7 +271,7 @@ PLATFORMS x86_64-linux DEPENDENCIES - glogin (= 0.14.0) + glogin (= 0.14.1) haml (= 6.3.0) iri (= 0.8.0) loog (= 0.5.1) diff --git a/front/front_login.rb b/front/front_login.rb index 8435da579..5b7405fdc 100644 --- a/front/front_login.rb +++ b/front/front_login.rb @@ -52,13 +52,12 @@ code = params[:code] error(400) if code.nil? json = settings.glogin.user(code) - identity = json['login'] cookies[:identity] = GLogin::Cookie::Open.new( - { id: identity }, + json, settings.config['github']['encryption_secret'], context ).to_s - flash(iri.cut('/'), 'You have been logged in') + flash(iri.cut('/'), "@#{json['login']} has been logged in") end get '/logout' do