Go to user sign in page on token failure
This commit is contained in:
@@ -11,10 +11,6 @@ App.ApplicationController = Ember.Controller.extend
|
||||
@set 'notice', null
|
||||
openDebugger: ->
|
||||
debugger
|
||||
evalDebugString: ->
|
||||
if text = $('#debug-eval-string')
|
||||
$('.debug-info').append eval(text)
|
||||
$('.debug-info').append "\n"
|
||||
|
||||
currentPathDidChange: (->
|
||||
@set 'notice', ''
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
App.SettingsController = Ember.Controller.extend
|
||||
locales: ['nl', 'en']
|
||||
actions:
|
||||
evalDebugString: ->
|
||||
if text = $('#debug-eval-string')
|
||||
result = eval(text)
|
||||
#result = JSON.stringify(result)
|
||||
result = result.toString()
|
||||
$('.debug-info').append result
|
||||
$('.debug-info').append "\n"
|
||||
|
||||
@@ -11,10 +11,11 @@ App.ApplicationRoute = Ember.Route.extend
|
||||
@setCurrentList()
|
||||
|
||||
unauthorized: ->
|
||||
Qstorage.setItem('auth_token', '')
|
||||
Qstorage.removeItem('auth_token')
|
||||
Qstorage.removeItem('user_id')
|
||||
@controllerFor('application').set 'list', null
|
||||
@send 'obtain_token'
|
||||
@controllerFor('application').redirect_to 'index', message: 'unauthorized'
|
||||
#@send 'obtain_token'
|
||||
@controllerFor('application').redirect_to 'sign_in', message: 'unauthorized'
|
||||
|
||||
handleAuthInfo: (user_id, auth_token)->
|
||||
Qstorage.setItem 'user_id', user_id
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# config valid only for Capistrano 3.1
|
||||
# lock '3.2.1'
|
||||
require 'capistrano/local_precompile'
|
||||
#require 'capistrano/local_precompile'
|
||||
|
||||
set :application, 'mozo.bar'
|
||||
#set :repo_url, 'root@uflows.com:/var/git/qwaiter.git'
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.9.22
|
||||
0.9.23
|
||||
|
||||
@@ -56,17 +56,14 @@ Feature: Sign up as user using facebook
|
||||
Then the user should be redirected to the homepage
|
||||
And the newly created user info should be stored in the local storage
|
||||
|
||||
@javascript @broken
|
||||
@javascript
|
||||
Scenario: Expired token
|
||||
Given there is no user information stored in the local storage
|
||||
When the user is on the homepage
|
||||
Given I am signed in as a user
|
||||
And the user is on the homepage
|
||||
When the user authentication token changes
|
||||
And the user is on the homepage
|
||||
Then the user is redirected to the sign in page
|
||||
When the user clicks the sign in via facebook button
|
||||
Then the user should be redirected to the homepage
|
||||
When the user has no active session
|
||||
And the user authentication token changes
|
||||
When the user is on the homepage
|
||||
Then the newly created user info should be stored in the local storage
|
||||
And there is no user information stored in the local storage
|
||||
|
||||
Scenario: Facebook problem OmniAuth.config.mock_auth[:facebook] = :invalid_credentials
|
||||
Scenario: Valid facebook login, but declines information requested by scope
|
||||
|
||||
Reference in New Issue
Block a user