Skip to content

Commit

Permalink
Fixes Google issue 12 by providing a clear message on auth failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonblaha committed Jun 28, 2014
1 parent 1c3176a commit 0980fe2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/sessions_controller.rb
Expand Up @@ -30,4 +30,8 @@ def failure
redirect_to root_url, :alert => "Authentication error: #{params[:message].humanize}"
end

def auth_failure
#things
end

end
4 changes: 4 additions & 0 deletions app/views/sessions/auth_failure.html.erb
@@ -0,0 +1,4 @@
<div class="center">
<h1>Authorization failure :-(</h1>
<h3>To use ISS Flyby install it by visiting https://glass.google.com/glassware</h3>
</div>
2 changes: 2 additions & 0 deletions config/routes.rb
Expand Up @@ -9,6 +9,8 @@
resources :spacecrafts

root :to => 'application#index'

get '/auth/failure', to: 'sessions#auth_failure'
get '/auth/:provider/callback', to: 'sessions#create'
get '/sign_in', to: 'sessions#new', as: 'sign_in'
get '/privacy', to: 'pages#privacy', as: 'privacy'
Expand Down

0 comments on commit 0980fe2

Please sign in to comment.